sports2d 0.5.3__tar.gz → 0.5.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sports2d-0.5.3 → sports2d-0.5.4}/PKG-INFO +1 -1
- {sports2d-0.5.3 → sports2d-0.5.4}/Sports2D/Demo/Config_demo.toml +4 -1
- {sports2d-0.5.3 → sports2d-0.5.4}/Sports2D/Sports2D.py +9 -5
- {sports2d-0.5.3 → sports2d-0.5.4}/setup.cfg +1 -1
- {sports2d-0.5.3 → sports2d-0.5.4}/sports2d.egg-info/PKG-INFO +1 -1
- {sports2d-0.5.3 → sports2d-0.5.4}/LICENSE +0 -0
- {sports2d-0.5.3 → sports2d-0.5.4}/README.md +0 -0
- {sports2d-0.5.3 → sports2d-0.5.4}/Sports2D/Demo/demo.mp4 +0 -0
- {sports2d-0.5.3 → sports2d-0.5.4}/Sports2D/Utilities/__init__.py +0 -0
- {sports2d-0.5.3 → sports2d-0.5.4}/Sports2D/Utilities/common.py +0 -0
- {sports2d-0.5.3 → sports2d-0.5.4}/Sports2D/Utilities/filter.py +0 -0
- {sports2d-0.5.3 → sports2d-0.5.4}/Sports2D/Utilities/skeletons.py +0 -0
- {sports2d-0.5.3 → sports2d-0.5.4}/Sports2D/Utilities/tests.py +0 -0
- {sports2d-0.5.3 → sports2d-0.5.4}/Sports2D/__init__.py +0 -0
- {sports2d-0.5.3 → sports2d-0.5.4}/Sports2D/process.py +0 -0
- {sports2d-0.5.3 → sports2d-0.5.4}/pyproject.toml +0 -0
- {sports2d-0.5.3 → sports2d-0.5.4}/setup.py +0 -0
- {sports2d-0.5.3 → sports2d-0.5.4}/sports2d.egg-info/SOURCES.txt +0 -0
- {sports2d-0.5.3 → sports2d-0.5.4}/sports2d.egg-info/dependency_links.txt +0 -0
- {sports2d-0.5.3 → sports2d-0.5.4}/sports2d.egg-info/entry_points.txt +0 -0
- {sports2d-0.5.3 → sports2d-0.5.4}/sports2d.egg-info/not-zip-safe +0 -0
- {sports2d-0.5.3 → sports2d-0.5.4}/sports2d.egg-info/requires.txt +0 -0
- {sports2d-0.5.3 → sports2d-0.5.4}/sports2d.egg-info/top_level.txt +0 -0
|
@@ -119,4 +119,7 @@ person_orientation = ['front', 'none', 'left'] # Choose among 'auto', 'none', 'f
|
|
|
119
119
|
# Example with one person on one video: ['front']
|
|
120
120
|
# Or ['front', 'none', 'left'] with 3 persons on one video
|
|
121
121
|
osim_setup_path = '../OpenSim_setup' # Path to the OpenSim setup folder
|
|
122
|
-
close_to_zero_speed_m = 0.2 # Sum for all keypoints: about 50 px/frame or 0.2 m/frame
|
|
122
|
+
close_to_zero_speed_m = 0.2 # Sum for all keypoints: about 50 px/frame or 0.2 m/frame
|
|
123
|
+
|
|
124
|
+
[logging]
|
|
125
|
+
use_custom_logging = false # if integrated in an API that already has logging
|
|
@@ -203,7 +203,8 @@ DEFAULT_CONFIG = {'project': {'video_input': ['demo.mp4'],
|
|
|
203
203
|
'person_orientation': ['front', '', 'left'],
|
|
204
204
|
'osim_setup_path': '../OpenSim_setup',
|
|
205
205
|
'close_to_zero_speed_m': 0.2
|
|
206
|
-
}
|
|
206
|
+
},
|
|
207
|
+
'logging': {'use_custom_logging': False}
|
|
207
208
|
}
|
|
208
209
|
|
|
209
210
|
CONFIG_HELP = {'config': ["C", "path to a toml configuration file"],
|
|
@@ -260,7 +261,8 @@ CONFIG_HELP = {'config': ["C", "path to a toml configuration file"],
|
|
|
260
261
|
'cut_off_frequency': ["", "cut-off frequency of the Butterworth filter. 3 if not specified"],
|
|
261
262
|
'sigma_kernel': ["", "sigma of the gaussian filter. 1 if not specified"],
|
|
262
263
|
'nb_values_used': ["", "number of values used for the loess filter. 5 if not specified"],
|
|
263
|
-
'kernel_size': ["", "kernel size of the median filter. 3 if not specified"]
|
|
264
|
+
'kernel_size': ["", "kernel size of the median filter. 3 if not specified"],
|
|
265
|
+
'use_custom_logging': ["", "use custom logging. false if not specified"]
|
|
264
266
|
}
|
|
265
267
|
|
|
266
268
|
|
|
@@ -414,11 +416,13 @@ def process(config='Config_demo.toml'):
|
|
|
414
416
|
else:
|
|
415
417
|
config_dict = read_config_file(config)
|
|
416
418
|
video_dir, video_files, frame_rates, time_ranges, result_dir = base_params(config_dict)
|
|
419
|
+
use_custom_logging = config_dict.get('logging').get('use_custom_logging')
|
|
417
420
|
|
|
418
421
|
result_dir.mkdir(parents=True, exist_ok=True)
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
+
if not use_custom_logging:
|
|
423
|
+
with open(result_dir / 'logs.txt', 'a+') as log_f: pass
|
|
424
|
+
logging.basicConfig(format='%(message)s', level=logging.INFO, force=True,
|
|
425
|
+
handlers = [logging.handlers.TimedRotatingFileHandler(result_dir / 'logs.txt', when='D', interval=7), logging.StreamHandler()])
|
|
422
426
|
|
|
423
427
|
for video_file, time_range, frame_rate in zip(video_files, time_ranges, frame_rates):
|
|
424
428
|
currentDateAndTime = datetime.now()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|