megadetector 5.0.23__py3-none-any.whl → 5.0.24__py3-none-any.whl
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.
Potentially problematic release.
This version of megadetector might be problematic. Click here for more details.
- megadetector/api/synchronous/api_core/animal_detection_api/api_backend.py +2 -3
- megadetector/classification/merge_classification_detection_output.py +2 -2
- megadetector/data_management/coco_to_labelme.py +2 -1
- megadetector/data_management/databases/integrity_check_json_db.py +15 -14
- megadetector/data_management/databases/subset_json_db.py +49 -21
- megadetector/data_management/mewc_to_md.py +340 -0
- megadetector/data_management/wi_to_md.py +41 -0
- megadetector/data_management/yolo_output_to_md_output.py +15 -8
- megadetector/detection/process_video.py +24 -7
- megadetector/detection/pytorch_detector.py +841 -160
- megadetector/detection/run_detector.py +340 -146
- megadetector/detection/run_detector_batch.py +304 -68
- megadetector/detection/run_inference_with_yolov5_val.py +61 -4
- megadetector/detection/tf_detector.py +6 -1
- megadetector/postprocessing/{combine_api_outputs.py → combine_batch_outputs.py} +10 -13
- megadetector/postprocessing/compare_batch_results.py +68 -6
- megadetector/postprocessing/md_to_labelme.py +7 -7
- megadetector/postprocessing/md_to_wi.py +40 -0
- megadetector/postprocessing/merge_detections.py +1 -1
- megadetector/postprocessing/postprocess_batch_results.py +10 -3
- megadetector/postprocessing/separate_detections_into_folders.py +32 -4
- megadetector/postprocessing/validate_batch_results.py +9 -4
- megadetector/utils/ct_utils.py +165 -45
- megadetector/utils/gpu_test.py +107 -0
- megadetector/utils/md_tests.py +355 -108
- megadetector/utils/path_utils.py +9 -2
- megadetector/utils/wi_utils.py +1794 -0
- megadetector/visualization/visualization_utils.py +82 -16
- megadetector/visualization/visualize_db.py +25 -7
- megadetector/visualization/visualize_detector_output.py +60 -13
- {megadetector-5.0.23.dist-info → megadetector-5.0.24.dist-info}/METADATA +10 -24
- {megadetector-5.0.23.dist-info → megadetector-5.0.24.dist-info}/RECORD +35 -33
- megadetector/detection/detector_training/__init__.py +0 -0
- megadetector/detection/detector_training/model_main_tf2.py +0 -114
- megadetector/utils/torch_test.py +0 -32
- {megadetector-5.0.23.dist-info → megadetector-5.0.24.dist-info}/LICENSE +0 -0
- {megadetector-5.0.23.dist-info → megadetector-5.0.24.dist-info}/WHEEL +0 -0
- {megadetector-5.0.23.dist-info → megadetector-5.0.24.dist-info}/top_level.txt +0 -0
megadetector/utils/path_utils.py
CHANGED
|
@@ -533,10 +533,17 @@ def wsl_path_to_windows_path(filename):
|
|
|
533
533
|
filename (str): filename to convert
|
|
534
534
|
|
|
535
535
|
Returns:
|
|
536
|
-
str: Windows equivalent to the WSL path [filename]
|
|
536
|
+
str: Windows equivalent to the WSL path [filename], or [filename] if the current
|
|
537
|
+
environment is neither Windows nor WSL.
|
|
537
538
|
"""
|
|
538
539
|
|
|
539
|
-
|
|
540
|
+
if (not environment_is_wsl()) and (os.name != 'nt'):
|
|
541
|
+
return filename
|
|
542
|
+
|
|
543
|
+
if environment_is_wsl():
|
|
544
|
+
result = subprocess.run(['wslpath', '-w', filename], text=True, capture_output=True)
|
|
545
|
+
else:
|
|
546
|
+
result = subprocess.run(['wsl', 'wslpath', '-w', filename], text=True, capture_output=True)
|
|
540
547
|
if result.returncode != 0:
|
|
541
548
|
print('Could not convert path {} from WSL to Windows'.format(filename))
|
|
542
549
|
return None
|