Skip to content

Commit 45419f5

Browse files
authored
check video sequence/video for null island, speed, and file size (#719)
* check video sequence null island, speed, and file size * refactor * process images * update * update * make sure a sequence of images comes from the same folder and the same camera * update * update * update * updates * cut by distance * fix tests * fix tests * do not use fixture for set up envvars * move some process_and_upload to the right place * pass envvars to subprocess * increase limit to 400km/h * fix tests in test_process.py * Revert "pass envvars to subprocess" This reverts commit 2609220.
1 parent 4fa3b4a commit 45419f5

File tree

8 files changed

+1306
-212
lines changed

8 files changed

+1306
-212
lines changed

mapillary_tools/constants.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@
77

88
ANSI_BOLD = "\033[1m"
99
ANSI_RESET_ALL = "\033[0m"
10+
# In meters
1011
CUTOFF_DISTANCE = float(os.getenv(_ENV_PREFIX + "CUTOFF_DISTANCE", 600))
12+
# In seconds
1113
CUTOFF_TIME = float(os.getenv(_ENV_PREFIX + "CUTOFF_TIME", 60))
1214
DUPLICATE_DISTANCE = float(os.getenv(_ENV_PREFIX + "DUPLICATE_DISTANCE", 0.1))
1315
DUPLICATE_ANGLE = float(os.getenv(_ENV_PREFIX + "DUPLICATE_ANGLE", 5))
16+
MAX_AVG_SPEED = float(
17+
os.getenv(_ENV_PREFIX + "MAX_AVG_SPEED", 400_000 / 3600)
18+
) # 400 KM/h
1419
# in seconds
1520
VIDEO_SAMPLE_INTERVAL = float(os.getenv(_ENV_PREFIX + "VIDEO_SAMPLE_INTERVAL", -1))
1621
# in meters

mapillary_tools/exceptions.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,15 @@ class MapillaryUploadUnauthorizedError(MapillaryUserError):
118118

119119
class MapillaryMetadataValidationError(MapillaryUserError, MapillaryDescriptionError):
120120
exit_code = 15
121+
122+
123+
class MapillaryFileTooLargeError(MapillaryDescriptionError):
124+
pass
125+
126+
127+
class MapillaryCaptureSpeedTooFastError(MapillaryDescriptionError):
128+
pass
129+
130+
131+
class MapillaryNullIslandError(MapillaryDescriptionError):
132+
pass

0 commit comments

Comments
 (0)