megadetector 5.0.22__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.

Files changed (38) hide show
  1. megadetector/api/synchronous/api_core/animal_detection_api/api_backend.py +2 -3
  2. megadetector/classification/merge_classification_detection_output.py +2 -2
  3. megadetector/data_management/coco_to_labelme.py +2 -1
  4. megadetector/data_management/databases/integrity_check_json_db.py +15 -14
  5. megadetector/data_management/databases/subset_json_db.py +49 -21
  6. megadetector/data_management/mewc_to_md.py +340 -0
  7. megadetector/data_management/wi_to_md.py +41 -0
  8. megadetector/data_management/yolo_output_to_md_output.py +15 -8
  9. megadetector/detection/process_video.py +24 -7
  10. megadetector/detection/pytorch_detector.py +841 -160
  11. megadetector/detection/run_detector.py +340 -146
  12. megadetector/detection/run_detector_batch.py +306 -70
  13. megadetector/detection/run_inference_with_yolov5_val.py +61 -4
  14. megadetector/detection/tf_detector.py +6 -1
  15. megadetector/postprocessing/{combine_api_outputs.py → combine_batch_outputs.py} +10 -13
  16. megadetector/postprocessing/compare_batch_results.py +68 -6
  17. megadetector/postprocessing/md_to_labelme.py +7 -7
  18. megadetector/postprocessing/md_to_wi.py +40 -0
  19. megadetector/postprocessing/merge_detections.py +1 -1
  20. megadetector/postprocessing/postprocess_batch_results.py +10 -3
  21. megadetector/postprocessing/separate_detections_into_folders.py +32 -4
  22. megadetector/postprocessing/validate_batch_results.py +9 -4
  23. megadetector/utils/ct_utils.py +172 -57
  24. megadetector/utils/gpu_test.py +107 -0
  25. megadetector/utils/md_tests.py +363 -108
  26. megadetector/utils/path_utils.py +9 -2
  27. megadetector/utils/wi_utils.py +1794 -0
  28. megadetector/visualization/visualization_utils.py +82 -16
  29. megadetector/visualization/visualize_db.py +25 -7
  30. megadetector/visualization/visualize_detector_output.py +60 -13
  31. {megadetector-5.0.22.dist-info → megadetector-5.0.24.dist-info}/LICENSE +0 -0
  32. {megadetector-5.0.22.dist-info → megadetector-5.0.24.dist-info}/METADATA +129 -143
  33. {megadetector-5.0.22.dist-info → megadetector-5.0.24.dist-info}/RECORD +35 -33
  34. {megadetector-5.0.22.dist-info → megadetector-5.0.24.dist-info}/top_level.txt +0 -0
  35. megadetector/detection/detector_training/__init__.py +0 -0
  36. megadetector/detection/detector_training/model_main_tf2.py +0 -114
  37. megadetector/utils/torch_test.py +0 -32
  38. {megadetector-5.0.22.dist-info → megadetector-5.0.24.dist-info}/WHEEL +0 -0
@@ -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
- result = subprocess.run(['wslpath', '-w', filename], text=True, capture_output=True)
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