megadetector 5.0.29__tar.gz → 10.0.1__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.
Potentially problematic release.
This version of megadetector might be problematic. Click here for more details.
- {megadetector-5.0.29 → megadetector-10.0.1}/LICENSE +0 -0
- {megadetector-5.0.29/megadetector.egg-info → megadetector-10.0.1}/PKG-INFO +135 -135
- {megadetector-5.0.29 → megadetector-10.0.1}/README-package.md +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/README.md +14 -4
- {megadetector-5.0.29/megadetector/api → megadetector-10.0.1/megadetector}/__init__.py +0 -0
- {megadetector-5.0.29/megadetector/api/batch_processing → megadetector-10.0.1/megadetector/api}/__init__.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/api/batch_processing/integration/digiKam/setup.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/api/batch_processing/integration/digiKam/xmp_integration.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/api/batch_processing/integration/eMammal/test_scripts/config_template.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/api/batch_processing/integration/eMammal/test_scripts/push_annotations_to_emammal.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/api/batch_processing/integration/eMammal/test_scripts/select_images_for_testing.py +0 -0
- {megadetector-5.0.29/megadetector/api/batch_processing/api_core → megadetector-10.0.1/megadetector/classification}/__init__.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/aggregate_classifier_probs.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/analyze_failed_images.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/cache_batchapi_outputs.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/create_classification_dataset.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/crop_detections.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/csv_to_json.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/detect_and_crop.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/efficientnet/__init__.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/efficientnet/model.py +8 -8
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/efficientnet/utils.py +6 -5
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/evaluate_model.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/identify_mislabeled_candidates.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/json_to_azcopy_list.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/json_validator.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/map_classification_categories.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/merge_classification_detection_output.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/prepare_classification_script.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/prepare_classification_script_mc.py +3 -3
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/run_classifier.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/save_mislabeled.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/train_classifier.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/train_classifier_tf.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/train_utils.py +0 -0
- {megadetector-5.0.29/megadetector/api/batch_processing/api_core/batch_service → megadetector-10.0.1/megadetector/data_management}/__init__.py +0 -0
- {megadetector-5.0.29/megadetector/api/batch_processing/api_core_support → megadetector-10.0.1/megadetector/data_management/annotations}/__init__.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/annotations/annotation_constants.py +0 -1
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/camtrap_dp_to_coco.py +34 -1
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/cct_json_utils.py +2 -2
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/cct_to_md.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/cct_to_wi.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/coco_to_labelme.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/coco_to_yolo.py +22 -5
- {megadetector-5.0.29/megadetector/api/batch_processing/api_support → megadetector-10.0.1/megadetector/data_management/databases}/__init__.py +0 -0
- megadetector-10.0.1/megadetector/data_management/databases/add_width_and_height_to_db.py +107 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/databases/combine_coco_camera_traps_files.py +2 -2
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/databases/integrity_check_json_db.py +29 -15
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/databases/subset_json_db.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/generate_crops_from_cct.py +50 -1
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/get_image_sizes.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/labelme_to_coco.py +4 -2
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/labelme_to_yolo.py +82 -2
- {megadetector-5.0.29/megadetector/api/batch_processing/data_preparation → megadetector-10.0.1/megadetector/data_management/lila}/__init__.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/lila/create_lila_blank_set.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/lila/create_lila_test_set.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/lila/create_links_to_md_results_files.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/lila/download_lila_subset.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/lila/generate_lila_per_image_labels.py +276 -18
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/lila/get_lila_annotation_counts.py +5 -3
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/lila/get_lila_image_counts.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/lila/lila_common.py +3 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/lila/test_lila_metadata_urls.py +15 -5
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/mewc_to_md.py +5 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/ocr_tools.py +4 -3
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/read_exif.py +20 -5
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/remap_coco_categories.py +66 -4
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/remove_exif.py +50 -1
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/rename_images.py +3 -3
- megadetector-10.0.1/megadetector/data_management/resize_coco_dataset.py +657 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/speciesnet_to_md.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/wi_download_csv_to_coco.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/yolo_output_to_md_output.py +131 -2
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/yolo_to_coco.py +140 -5
- {megadetector-5.0.29/megadetector/api/synchronous → megadetector-10.0.1/megadetector/detection}/__init__.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/detection/change_detection.py +4 -3
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/detection/process_video.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/detection/pytorch_detector.py +60 -22
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/detection/run_detector.py +225 -25
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/detection/run_detector_batch.py +42 -16
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/detection/run_inference_with_yolov5_val.py +12 -2
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/detection/run_tiled_inference.py +1 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/detection/tf_detector.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/detection/video_utils.py +53 -24
- {megadetector-5.0.29/megadetector/api/synchronous/api_core/animal_detection_api → megadetector-10.0.1/megadetector/postprocessing}/__init__.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/postprocessing/add_max_conf.py +4 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/postprocessing/categorize_detections_by_size.py +1 -1
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/postprocessing/classification_postprocessing.py +55 -20
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/postprocessing/combine_batch_outputs.py +3 -2
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/postprocessing/compare_batch_results.py +64 -10
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/postprocessing/convert_output_format.py +12 -8
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/postprocessing/create_crop_folder.py +137 -10
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/postprocessing/detector_calibration.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/postprocessing/generate_csv_report.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/postprocessing/load_api_results.py +26 -8
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/postprocessing/md_to_coco.py +4 -4
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/postprocessing/md_to_labelme.py +18 -7
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/postprocessing/md_to_wi.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/postprocessing/merge_detections.py +5 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/postprocessing/postprocess_batch_results.py +6 -3
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/postprocessing/remap_detection_categories.py +55 -2
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/postprocessing/render_detection_confusion_matrix.py +9 -6
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/postprocessing/repeat_detection_elimination/find_repeat_detections.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/postprocessing/repeat_detection_elimination/remove_repeat_detections.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/postprocessing/repeat_detection_elimination/repeat_detections_core.py +2 -2
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/postprocessing/separate_detections_into_folders.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/postprocessing/subset_json_detector_output.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/postprocessing/top_folders_to_bottom.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/postprocessing/validate_batch_results.py +0 -0
- {megadetector-5.0.29/megadetector/api/synchronous/api_core/tests → megadetector-10.0.1/megadetector/taxonomy_mapping}/__init__.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/taxonomy_mapping/map_lila_taxonomy_to_wi_taxonomy.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/taxonomy_mapping/map_new_lila_datasets.py +3 -4
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/taxonomy_mapping/prepare_lila_taxonomy_release.py +40 -19
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/taxonomy_mapping/preview_lila_taxonomy.py +1 -1
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/taxonomy_mapping/retrieve_sample_image.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/taxonomy_mapping/simple_image_download.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/taxonomy_mapping/species_lookup.py +123 -41
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/taxonomy_mapping/taxonomy_csv_checker.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/taxonomy_mapping/taxonomy_graph.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/taxonomy_mapping/validate_lila_category_mappings.py +0 -0
- {megadetector-5.0.29/megadetector/classification → megadetector-10.0.1/megadetector/utils}/__init__.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/utils/ct_utils.py +133 -113
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/utils/directory_listing.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/utils/gpu_test.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/utils/md_tests.py +93 -13
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/utils/path_utils.py +137 -107
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/utils/process_utils.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/utils/split_locations_into_train_val.py +2 -2
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/utils/string_utils.py +7 -7
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/utils/url_utils.py +81 -58
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/utils/wi_utils.py +46 -17
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/utils/write_html_image_list.py +0 -0
- {megadetector-5.0.29/megadetector/data_management → megadetector-10.0.1/megadetector/visualization}/__init__.py +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/visualization/plot_utils.py +13 -9
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/visualization/render_images_with_thumbnails.py +2 -1
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/visualization/visualization_utils.py +94 -46
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/visualization/visualize_db.py +36 -9
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector/visualization/visualize_detector_output.py +4 -4
- {megadetector-5.0.29 → megadetector-10.0.1/megadetector.egg-info}/PKG-INFO +135 -135
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector.egg-info/SOURCES.txt +1 -25
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector.egg-info/dependency_links.txt +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector.egg-info/requires.txt +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/megadetector.egg-info/top_level.txt +0 -0
- {megadetector-5.0.29 → megadetector-10.0.1}/pyproject.toml +33 -4
- {megadetector-5.0.29 → megadetector-10.0.1}/setup.cfg +4 -4
- megadetector-5.0.29/megadetector/api/batch_processing/api_core/batch_service/score.py +0 -438
- megadetector-5.0.29/megadetector/api/batch_processing/api_core/server.py +0 -294
- megadetector-5.0.29/megadetector/api/batch_processing/api_core/server_api_config.py +0 -97
- megadetector-5.0.29/megadetector/api/batch_processing/api_core/server_app_config.py +0 -55
- megadetector-5.0.29/megadetector/api/batch_processing/api_core/server_batch_job_manager.py +0 -220
- megadetector-5.0.29/megadetector/api/batch_processing/api_core/server_job_status_table.py +0 -149
- megadetector-5.0.29/megadetector/api/batch_processing/api_core/server_orchestration.py +0 -360
- megadetector-5.0.29/megadetector/api/batch_processing/api_core/server_utils.py +0 -88
- megadetector-5.0.29/megadetector/api/batch_processing/api_core_support/aggregate_results_manually.py +0 -46
- megadetector-5.0.29/megadetector/api/batch_processing/api_support/summarize_daily_activity.py +0 -152
- megadetector-5.0.29/megadetector/api/synchronous/api_core/animal_detection_api/api_backend.py +0 -151
- megadetector-5.0.29/megadetector/api/synchronous/api_core/animal_detection_api/api_frontend.py +0 -263
- megadetector-5.0.29/megadetector/api/synchronous/api_core/animal_detection_api/config.py +0 -35
- megadetector-5.0.29/megadetector/api/synchronous/api_core/tests/load_test.py +0 -109
- megadetector-5.0.29/megadetector/data_management/annotations/__init__.py +0 -0
- megadetector-5.0.29/megadetector/data_management/databases/__init__.py +0 -0
- megadetector-5.0.29/megadetector/data_management/databases/add_width_and_height_to_db.py +0 -34
- megadetector-5.0.29/megadetector/data_management/lila/__init__.py +0 -0
- megadetector-5.0.29/megadetector/data_management/resize_coco_dataset.py +0 -189
- megadetector-5.0.29/megadetector/detection/__init__.py +0 -0
- megadetector-5.0.29/megadetector/postprocessing/__init__.py +0 -0
- megadetector-5.0.29/megadetector/taxonomy_mapping/__init__.py +0 -0
- megadetector-5.0.29/megadetector/utils/__init__.py +0 -0
- megadetector-5.0.29/megadetector/utils/azure_utils.py +0 -178
- megadetector-5.0.29/megadetector/utils/sas_blob_utils.py +0 -513
- megadetector-5.0.29/megadetector/visualization/__init__.py +0 -0
|
File without changes
|
|
@@ -1,135 +1,135 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: megadetector
|
|
3
|
-
Version:
|
|
4
|
-
Summary: MegaDetector is an AI model that helps conservation folks spend less time doing boring things with camera trap images.
|
|
5
|
-
Author-email: Your friendly neighborhood MegaDetector team <cameratraps@lila.science>
|
|
6
|
-
Maintainer-email: Your friendly neighborhood MegaDetector team <cameratraps@lila.science>
|
|
7
|
-
License: MIT License
|
|
8
|
-
|
|
9
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
-
in the Software without restriction, including without limitation the rights
|
|
12
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
-
furnished to do so, subject to the following conditions:
|
|
15
|
-
|
|
16
|
-
The above copyright notice and this permission notice shall be included in all
|
|
17
|
-
copies or substantial portions of the Software.
|
|
18
|
-
|
|
19
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
|
-
SOFTWARE.
|
|
26
|
-
|
|
27
|
-
Project-URL: Homepage, https://github.com/agentmorris/MegaDetector
|
|
28
|
-
Project-URL: Documentation, https://megadetector.readthedocs.io
|
|
29
|
-
Project-URL: Bug Reports, https://github.com/agentmorris/MegaDetector/issues
|
|
30
|
-
Project-URL: Source, https://github.com/agentmorris/MegaDetector
|
|
31
|
-
Keywords: camera traps,conservation,wildlife,ai,megadetector
|
|
32
|
-
Classifier: Programming Language :: Python :: 3
|
|
33
|
-
Requires-Python: <3.14,>=3.9
|
|
34
|
-
Description-Content-Type: text/markdown
|
|
35
|
-
License-File: LICENSE
|
|
36
|
-
Requires-Dist: mkl==2024.0; sys_platform != "darwin"
|
|
37
|
-
Requires-Dist: numpy>=1.26.4
|
|
38
|
-
Requires-Dist: Pillow>=9.5
|
|
39
|
-
Requires-Dist: tqdm>=4.64.0
|
|
40
|
-
Requires-Dist: jsonpickle>=3.0.2
|
|
41
|
-
Requires-Dist: humanfriendly>=10.0
|
|
42
|
-
Requires-Dist: matplotlib>=3.8.0
|
|
43
|
-
Requires-Dist: opencv-python>=4.8.0
|
|
44
|
-
Requires-Dist: requests>=2.31.0
|
|
45
|
-
Requires-Dist: pyqtree>=1.0.0
|
|
46
|
-
Requires-Dist: scikit-learn>=1.3.1
|
|
47
|
-
Requires-Dist: pandas>=2.1.1
|
|
48
|
-
Requires-Dist: python-dateutil
|
|
49
|
-
Requires-Dist: send2trash
|
|
50
|
-
Requires-Dist: python-dateutil
|
|
51
|
-
Requires-Dist: clipboard
|
|
52
|
-
Requires-Dist: dill
|
|
53
|
-
Requires-Dist: ruff
|
|
54
|
-
Requires-Dist: pytest
|
|
55
|
-
Requires-Dist: ultralytics-yolov5==0.1.1
|
|
56
|
-
Requires-Dist: yolov9pip==0.0.4
|
|
57
|
-
Dynamic: license-file
|
|
58
|
-
|
|
59
|
-
# MegaDetector
|
|
60
|
-
|
|
61
|
-
This package is a pip-installable version of the support/inference code for [MegaDetector](https://github.com/agentmorris/MegaDetector/?tab=readme-ov-file#megadetector), an object detection model that helps conservation biologists spend less time doing boring things with camera trap images. Complete documentation for this Python package is available at [megadetector.readthedocs.io](https://megadetector.readthedocs.io).
|
|
62
|
-
|
|
63
|
-
If you aren't looking for the Python package specifically, and you just want to learn more about what MegaDetector is all about, head over to the [MegaDetector repo](https://github.com/agentmorris/MegaDetector/?tab=readme-ov-file#megadetector).
|
|
64
|
-
|
|
65
|
-
If you don't want to run MegaDetector, and you just want to use the utilities in this package - postprocessing, manipulating large volumes of camera trap images, etc. - you may want to check out the [megadetector-utils](https://pypi.org/project/megadetector-utils/) package, which is identical to this one, but excludes all of the PyTorch/YOLO dependencies, and is thus approximately one zillion times smaller.
|
|
66
|
-
|
|
67
|
-
## Installation
|
|
68
|
-
|
|
69
|
-
Install with:
|
|
70
|
-
|
|
71
|
-
`pip install megadetector`
|
|
72
|
-
|
|
73
|
-
MegaDetector model weights aren't downloaded at the time you install the package, but they will be (optionally) automatically downloaded the first time you run the model.
|
|
74
|
-
|
|
75
|
-
## Package reference
|
|
76
|
-
|
|
77
|
-
See [megadetector.readthedocs.io](https://megadetector.readthedocs.io).
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
## Examples of things you can do with this package
|
|
81
|
-
|
|
82
|
-
### Run MegaDetector on one image and count the number of detections
|
|
83
|
-
|
|
84
|
-
```
|
|
85
|
-
from megadetector.utils import url_utils
|
|
86
|
-
from megadetector.visualization import visualization_utils as vis_utils
|
|
87
|
-
from megadetector.detection import run_detector
|
|
88
|
-
|
|
89
|
-
# This is the image at the bottom of this page, it has one animal in it
|
|
90
|
-
image_url = 'https://github.com/agentmorris/MegaDetector/raw/main/images/orinoquia-thumb-web.jpg'
|
|
91
|
-
temporary_filename = url_utils.download_url(image_url)
|
|
92
|
-
|
|
93
|
-
image = vis_utils.load_image(temporary_filename)
|
|
94
|
-
|
|
95
|
-
# This will automatically download MDv5a; you can also specify a filename.
|
|
96
|
-
model = run_detector.load_detector('MDV5A')
|
|
97
|
-
|
|
98
|
-
result = model.generate_detections_one_image(image)
|
|
99
|
-
|
|
100
|
-
detections_above_threshold = [d for d in result['detections'] if d['conf'] > 0.2]
|
|
101
|
-
print('Found {} detections above threshold'.format(len(detections_above_threshold)))
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### Run MegaDetector on a folder of images
|
|
105
|
-
|
|
106
|
-
```
|
|
107
|
-
from megadetector.detection.run_detector_batch import \
|
|
108
|
-
load_and_run_detector_batch, write_results_to_file
|
|
109
|
-
from megadetector.utils import path_utils
|
|
110
|
-
import os
|
|
111
|
-
|
|
112
|
-
# Pick a folder to run MD on recursively, and an output file
|
|
113
|
-
image_folder = os.path.expanduser('~/megadetector_test_images')
|
|
114
|
-
output_file = os.path.expanduser('~/megadetector_output_test.json')
|
|
115
|
-
|
|
116
|
-
# Recursively find images
|
|
117
|
-
image_file_names = path_utils.find_images(image_folder,recursive=True)
|
|
118
|
-
|
|
119
|
-
# This will automatically download MDv5a; you can also specify a filename.
|
|
120
|
-
results = load_and_run_detector_batch('MDV5A', image_file_names)
|
|
121
|
-
|
|
122
|
-
# Write results to a format that Timelapse and other downstream tools like.
|
|
123
|
-
write_results_to_file(results,
|
|
124
|
-
output_file,
|
|
125
|
-
relative_path_base=image_folder,
|
|
126
|
-
detector_file=detector_filename)
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
## Contact
|
|
130
|
-
|
|
131
|
-
Contact <a href="cameratraps@lila.science">cameratraps@lila.science</a> with questions.
|
|
132
|
-
|
|
133
|
-
## Gratuitous animal picture
|
|
134
|
-
|
|
135
|
-
<img src="https://github.com/agentmorris/MegaDetector/raw/main/images/orinoquia-thumb-web_detections.jpg"><br/>Image credit University of Minnesota, from the [Orinoquía Camera Traps](http://lila.science/datasets/orinoquia-camera-traps/) data set.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: megadetector
|
|
3
|
+
Version: 10.0.1
|
|
4
|
+
Summary: MegaDetector is an AI model that helps conservation folks spend less time doing boring things with camera trap images.
|
|
5
|
+
Author-email: Your friendly neighborhood MegaDetector team <cameratraps@lila.science>
|
|
6
|
+
Maintainer-email: Your friendly neighborhood MegaDetector team <cameratraps@lila.science>
|
|
7
|
+
License: MIT License
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in all
|
|
17
|
+
copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
|
+
SOFTWARE.
|
|
26
|
+
|
|
27
|
+
Project-URL: Homepage, https://github.com/agentmorris/MegaDetector
|
|
28
|
+
Project-URL: Documentation, https://megadetector.readthedocs.io
|
|
29
|
+
Project-URL: Bug Reports, https://github.com/agentmorris/MegaDetector/issues
|
|
30
|
+
Project-URL: Source, https://github.com/agentmorris/MegaDetector
|
|
31
|
+
Keywords: camera traps,conservation,wildlife,ai,megadetector
|
|
32
|
+
Classifier: Programming Language :: Python :: 3
|
|
33
|
+
Requires-Python: <3.14,>=3.9
|
|
34
|
+
Description-Content-Type: text/markdown
|
|
35
|
+
License-File: LICENSE
|
|
36
|
+
Requires-Dist: mkl==2024.0; sys_platform != "darwin"
|
|
37
|
+
Requires-Dist: numpy>=1.26.4
|
|
38
|
+
Requires-Dist: Pillow>=9.5
|
|
39
|
+
Requires-Dist: tqdm>=4.64.0
|
|
40
|
+
Requires-Dist: jsonpickle>=3.0.2
|
|
41
|
+
Requires-Dist: humanfriendly>=10.0
|
|
42
|
+
Requires-Dist: matplotlib>=3.8.0
|
|
43
|
+
Requires-Dist: opencv-python>=4.8.0
|
|
44
|
+
Requires-Dist: requests>=2.31.0
|
|
45
|
+
Requires-Dist: pyqtree>=1.0.0
|
|
46
|
+
Requires-Dist: scikit-learn>=1.3.1
|
|
47
|
+
Requires-Dist: pandas>=2.1.1
|
|
48
|
+
Requires-Dist: python-dateutil
|
|
49
|
+
Requires-Dist: send2trash
|
|
50
|
+
Requires-Dist: python-dateutil
|
|
51
|
+
Requires-Dist: clipboard
|
|
52
|
+
Requires-Dist: dill
|
|
53
|
+
Requires-Dist: ruff
|
|
54
|
+
Requires-Dist: pytest
|
|
55
|
+
Requires-Dist: ultralytics-yolov5==0.1.1
|
|
56
|
+
Requires-Dist: yolov9pip==0.0.4
|
|
57
|
+
Dynamic: license-file
|
|
58
|
+
|
|
59
|
+
# MegaDetector
|
|
60
|
+
|
|
61
|
+
This package is a pip-installable version of the support/inference code for [MegaDetector](https://github.com/agentmorris/MegaDetector/?tab=readme-ov-file#megadetector), an object detection model that helps conservation biologists spend less time doing boring things with camera trap images. Complete documentation for this Python package is available at [megadetector.readthedocs.io](https://megadetector.readthedocs.io).
|
|
62
|
+
|
|
63
|
+
If you aren't looking for the Python package specifically, and you just want to learn more about what MegaDetector is all about, head over to the [MegaDetector repo](https://github.com/agentmorris/MegaDetector/?tab=readme-ov-file#megadetector).
|
|
64
|
+
|
|
65
|
+
If you don't want to run MegaDetector, and you just want to use the utilities in this package - postprocessing, manipulating large volumes of camera trap images, etc. - you may want to check out the [megadetector-utils](https://pypi.org/project/megadetector-utils/) package, which is identical to this one, but excludes all of the PyTorch/YOLO dependencies, and is thus approximately one zillion times smaller.
|
|
66
|
+
|
|
67
|
+
## Installation
|
|
68
|
+
|
|
69
|
+
Install with:
|
|
70
|
+
|
|
71
|
+
`pip install megadetector`
|
|
72
|
+
|
|
73
|
+
MegaDetector model weights aren't downloaded at the time you install the package, but they will be (optionally) automatically downloaded the first time you run the model.
|
|
74
|
+
|
|
75
|
+
## Package reference
|
|
76
|
+
|
|
77
|
+
See [megadetector.readthedocs.io](https://megadetector.readthedocs.io).
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
## Examples of things you can do with this package
|
|
81
|
+
|
|
82
|
+
### Run MegaDetector on one image and count the number of detections
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
from megadetector.utils import url_utils
|
|
86
|
+
from megadetector.visualization import visualization_utils as vis_utils
|
|
87
|
+
from megadetector.detection import run_detector
|
|
88
|
+
|
|
89
|
+
# This is the image at the bottom of this page, it has one animal in it
|
|
90
|
+
image_url = 'https://github.com/agentmorris/MegaDetector/raw/main/images/orinoquia-thumb-web.jpg'
|
|
91
|
+
temporary_filename = url_utils.download_url(image_url)
|
|
92
|
+
|
|
93
|
+
image = vis_utils.load_image(temporary_filename)
|
|
94
|
+
|
|
95
|
+
# This will automatically download MDv5a; you can also specify a filename.
|
|
96
|
+
model = run_detector.load_detector('MDV5A')
|
|
97
|
+
|
|
98
|
+
result = model.generate_detections_one_image(image)
|
|
99
|
+
|
|
100
|
+
detections_above_threshold = [d for d in result['detections'] if d['conf'] > 0.2]
|
|
101
|
+
print('Found {} detections above threshold'.format(len(detections_above_threshold)))
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Run MegaDetector on a folder of images
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
from megadetector.detection.run_detector_batch import \
|
|
108
|
+
load_and_run_detector_batch, write_results_to_file
|
|
109
|
+
from megadetector.utils import path_utils
|
|
110
|
+
import os
|
|
111
|
+
|
|
112
|
+
# Pick a folder to run MD on recursively, and an output file
|
|
113
|
+
image_folder = os.path.expanduser('~/megadetector_test_images')
|
|
114
|
+
output_file = os.path.expanduser('~/megadetector_output_test.json')
|
|
115
|
+
|
|
116
|
+
# Recursively find images
|
|
117
|
+
image_file_names = path_utils.find_images(image_folder,recursive=True)
|
|
118
|
+
|
|
119
|
+
# This will automatically download MDv5a; you can also specify a filename.
|
|
120
|
+
results = load_and_run_detector_batch('MDV5A', image_file_names)
|
|
121
|
+
|
|
122
|
+
# Write results to a format that Timelapse and other downstream tools like.
|
|
123
|
+
write_results_to_file(results,
|
|
124
|
+
output_file,
|
|
125
|
+
relative_path_base=image_folder,
|
|
126
|
+
detector_file=detector_filename)
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Contact
|
|
130
|
+
|
|
131
|
+
Contact <a href="cameratraps@lila.science">cameratraps@lila.science</a> with questions.
|
|
132
|
+
|
|
133
|
+
## Gratuitous animal picture
|
|
134
|
+
|
|
135
|
+
<img src="https://github.com/agentmorris/MegaDetector/raw/main/images/orinoquia-thumb-web_detections.jpg"><br/>Image credit University of Minnesota, from the [Orinoquía Camera Traps](http://lila.science/datasets/orinoquia-camera-traps/) data set.
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
<img src="images/md_logo_450px.png" width="450"/><br/>
|
|
2
2
|
|
|
3
3
|
...helping conservation biologists spend less time doing boring things with camera trap images.
|
|
4
4
|
|
|
@@ -74,6 +74,7 @@ Here are a few of the organizations that have used MegaDetector... we're only li
|
|
|
74
74
|
* [Research Institute of Organic Agriculture](https://www.fibl.org/en/) (FiBL)
|
|
75
75
|
* [A/Vian Ecological Consulting](https://avianeco.com/)
|
|
76
76
|
* [Wildlife Insights](https://www.wildlifeinsights.org/)
|
|
77
|
+
* [MammalWeb](https://www.mammalweb.org/)
|
|
77
78
|
|
|
78
79
|
* [Applied Conservation Macro Ecology Lab](http://www.acmelab.ca/), University of Victoria
|
|
79
80
|
* [Banff National Park Resource Conservation](https://www.pc.gc.ca/en/pn-np/ab/banff/nature/conservation), Parks Canada
|
|
@@ -85,9 +86,11 @@ Here are a few of the organizations that have used MegaDetector... we're only li
|
|
|
85
86
|
* [Centre for Ecosystem Science](https://www.unsw.edu.au/research/), UNSW Sydney
|
|
86
87
|
* [Cross-Cultural Ecology Lab](https://crossculturalecology.net/), Macquarie University
|
|
87
88
|
* [DC Cat Count](https://hub.dccatcount.org/), led by the Humane Rescue Alliance
|
|
89
|
+
* [Department of Anthropology and Archaeology](https://arts.ucalgary.ca/anthropology-archaeology), University of Calgary
|
|
88
90
|
* [Department of Fish and Wildlife Sciences](https://www.uidaho.edu/cnr/departments/fish-and-wildlife-sciences), University of Idaho
|
|
89
91
|
* [Department of Society & Conservation](https://www.umt.edu/environment/about/departments/socon/), W.A. Franke College of Forestry & Conservation, University of Montana
|
|
90
92
|
* [Department of Wildlife Ecology and Conservation](https://wec.ifas.ufl.edu/), University of Florida
|
|
93
|
+
* [Fodrie Lab](https://fodriefishecol.wixsite.com/unc-fish/), Institute of Marine Sciences, UNC Chapel Hill
|
|
91
94
|
* [Gola Forest Programme](https://www.rspb.org.uk/our-work/conservation/projects/scientific-support-for-the-gola-forest-programme/), Royal Society for the Protection of Birds (RSPB)
|
|
92
95
|
* [Graeme Shannon's Research Group](https://wildliferesearch.co.uk/group-1), Bangor University
|
|
93
96
|
* [Grizzly Bear Recovery Program](https://www.fws.gov/office/grizzly-bear-recovery-program), U.S. Fish & Wildlife Service
|
|
@@ -111,6 +114,7 @@ Here are a few of the organizations that have used MegaDetector... we're only li
|
|
|
111
114
|
* [Wildlife Research](https://www.dfw.state.or.us/wildlife/research/index.asp), Oregon Department of Fish and Wildlife
|
|
112
115
|
* [Wildlife Division](https://www.michigan.gov/dnr/about/contact/wildlife), Michigan Department of Natural Resources
|
|
113
116
|
* [Kohl Wildlife Lab](https://kohlwildlifelab.com/), University of Georgia
|
|
117
|
+
* [SPEC Lab](https://thespeclab.weebly.com/) and [Cherry Lab](https://www.ckwri.tamuk.edu/about/michael-j-cherry-phd), Caesar Kleberg Wildlife Research Institute, Texas A&M Kingsville
|
|
114
118
|
* Ecology and Conservation of Amazonian Vertebrates Research Group, Federal University of Amapá
|
|
115
119
|
* Department of Ecology, TU Berlin
|
|
116
120
|
* Ghost Cat Analytics
|
|
@@ -135,7 +139,11 @@ Here are a few of the organizations that have used MegaDetector... we're only li
|
|
|
135
139
|
* [Trapper](https://trapper-project.readthedocs.io/en/latest/overview.html) ([tutorial](https://trapper-project.readthedocs.io/en/latest/tutorial.html))
|
|
136
140
|
* [BirdLife Malta](https://birdlifemalta.org/) ([tweet](https://x.com/BirdLife_Malta/status/1817456839862173783?t=S-KRiZ5R1-CoW8-tbYNjqQ&s=03)) ([LI post](https://www.linkedin.com/posts/birdlifemalta_worldnatureconservationday-shearwater-colony-activity-7223220656589463553-X2Mc/?utm_source=share&utm_medium=member_android))
|
|
137
141
|
* [Endangered Landscapes and Seascapes Programme](https://www.endangeredlandscapes.org/), Cambridge Conservation Initiative ([blog post](https://www.endangeredlandscapes.org/news/ai-for-wildlife-monitoring-a-real-time-alert-system-for-bears-and-wild-boars-in-romanias-carpathian-mountains/))
|
|
138
|
-
|
|
142
|
+
* [UK National Hedgehog Monitoring Programme](https://www.the-ies.org/analysis/lens-wild-innovations-wildlife-0) ([blog post](https://www.the-ies.org/analysis/lens-wild-innovations-wildlife-0))
|
|
143
|
+
* [Fort Collins Science Center](https://www.usgs.gov/centers/fort-collins-science-center/), U.S. Geological Survey ([blog post](https://www.usgs.gov/centers/fort-collins-science-center/science/early-detection-and-rapid-response-tools-invasive-tegu))
|
|
144
|
+
* [Ontario Ministry of Natural Resources](https://www.ontario.ca/page/ministry-natural-resources) ([post](https://www.facebook.com/ONresources/posts/artificial-intelligence-ai-to-the-rescueone-disadvantage-of-trail-cameras-and-ca/1012916944364710/))
|
|
145
|
+
* [Loisaba Conservancy](https://www.loisaba.com/) ([blog post](https://www.loisaba.com/post/help-scientists-understand-how-an-invasive-cactus-affects-mammal-behaviour))
|
|
146
|
+
* [Urban Rivers](https://urbanrivers.org/) ([blog post](https://www.morescode-analytics.com/2025/06/27/filtering-90-pct-blank-wildlife.html))
|
|
139
147
|
* [Road Ecology Center](https://roadecology.ucdavis.edu/), University of California, Davis ([Wildlife Observer Network platform](https://roadecology.ucdavis.edu/research/projects/wildlife-observer-network))
|
|
140
148
|
* [The Nature Conservancy in California](https://www.nature.org/en-us/about-us/where-we-work/united-states/california/) ([Animl platform](https://github.com/tnc-ca-geo/animl-frontend)) ([story](https://www.vision-systems.com/non-factory/environment-agriculture/article/14304433/the-nature-conservancy-brings-cameras-ai-to-invasive-species-prevention))
|
|
141
149
|
* [San Diego Zoo Wildlife Alliance](https://science.sandiegozoo.org/) ([Animl R package](https://github.com/conservationtechlab/animl))
|
|
@@ -143,7 +151,7 @@ Here are a few of the organizations that have used MegaDetector... we're only li
|
|
|
143
151
|
|
|
144
152
|
Also see:
|
|
145
153
|
|
|
146
|
-
* The [list of MD-related GUIs, platforms, and GitHub repos](https://github.com/agentmorris/MegaDetector/blob/main/megadetector.md#is-there-a-gui) within the MegaDetector User Guide
|
|
154
|
+
* The [list of MD-related GUIs, platforms, and GitHub repos](https://github.com/agentmorris/MegaDetector/blob/main/megadetector.md#is-there-a-gui) within the MegaDetector User Guide... although you can never have too many lists, so here they are in a concise comma-separated list: [Wildlife Insights](https://wildlifeinsights.org/), [Animal Detect](https://www.animaldetect.com), [TrapTagger](https://wildeyeconservation.org/trap-tagger-about/), [WildTrax](https://www.wildtrax.ca/), [Agouti](https://agouti.eu/), [Trapper](https://trapper-project.readthedocs.io/en/latest/overview.html), [Camelot](https://camelotproject.org/), [WildePod](https://wildepod.org/), [wpsWatch](https://wildlabs.net/inventory/products/wpswatch), [TNC Animl](https://animl.camera/) ([code](https://github.com/tnc-ca-geo/animl-frontend)), [Wildlife Observer Network](https://roadecology.ucdavis.edu/research/projects/wildlife-observer-network), [Zooniverse ML Subject Assistant](https://subject-assistant.zooniverse.org/#/intro), [Dudek AI Image Toolkit](https://ait.dudek.com), [Zamba Cloud](https://github.com/drivendataorg/zamba), [OCAPI](https://www.terroiko.fr/ocapi/).
|
|
147
155
|
|
|
148
156
|
* [Peter's map of AddaxAI (formerly EcoAssist) users](https://addaxdatascience.com/addaxai/) (who are also MegaDetector users!)
|
|
149
157
|
|
|
@@ -201,7 +209,7 @@ Code for:
|
|
|
201
209
|
|
|
202
210
|
#### megadetector/api
|
|
203
211
|
|
|
204
|
-
Code for hosting our models as an API, either for synchronous operation (i.e., for real-time inference) or as a batch process (for large biodiversity surveys).
|
|
212
|
+
Code for hosting our models as an API, either for synchronous operation (i.e., for real-time inference) or as a batch process (for large biodiversity surveys). This folder is largely deprecated, and primarily exists now only to hold documentation that is still relevant, to which there are permanent links. Mostly everything in this folder has been moved to the "archive" folder.
|
|
205
213
|
|
|
206
214
|
|
|
207
215
|
#### megadetector/classification
|
|
@@ -271,3 +279,5 @@ This project welcomes contributions, as pull requests, issues, or suggestions by
|
|
|
271
279
|
If you are interesting in getting involved in the conservation technology space, and MegaDetector just happens to be the first page you landed on, and none of our open issues are getting you fired up, don't fret! Head over to the [WILDLABS discussion forums](https://wildlabs.net/discussions) and let the community know you're a developer looking to get involved. Someone needs your help!
|
|
272
280
|
|
|
273
281
|
Information about the coding conventions, linting, testing, and documentation tools used by this repo are available in [developers.md](developers.md).
|
|
282
|
+
|
|
283
|
+
Speaking of contributions... thanks to Erin Roche from Idaho Fish and Game for the MegaDetector logo at the top of this page!
|
|
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
|
{megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/analyze_failed_images.py
RENAMED
|
File without changes
|
{megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/cache_batchapi_outputs.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/efficientnet/__init__.py
RENAMED
|
File without changes
|
{megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/efficientnet/model.py
RENAMED
|
@@ -93,7 +93,7 @@ class MBConvBlock(nn.Module):
|
|
|
93
93
|
|
|
94
94
|
Args:
|
|
95
95
|
inputs (tensor): Input tensor.
|
|
96
|
-
drop_connect_rate (bool): Drop connect rate (float, between 0 and 1).
|
|
96
|
+
drop_connect_rate (bool, optional): Drop connect rate (float, between 0 and 1).
|
|
97
97
|
|
|
98
98
|
Returns:
|
|
99
99
|
Output of this block after processing.
|
|
@@ -135,7 +135,7 @@ class MBConvBlock(nn.Module):
|
|
|
135
135
|
"""Sets swish function as memory efficient (for training) or standard (for export).
|
|
136
136
|
|
|
137
137
|
Args:
|
|
138
|
-
memory_efficient (bool): Whether to use memory-efficient version of swish.
|
|
138
|
+
memory_efficient (bool, optional): Whether to use memory-efficient version of swish.
|
|
139
139
|
"""
|
|
140
140
|
self._swish = MemoryEfficientSwish() if memory_efficient else Swish()
|
|
141
141
|
|
|
@@ -221,7 +221,7 @@ class EfficientNet(nn.Module):
|
|
|
221
221
|
"""Sets swish function as memory efficient (for training) or standard (for export).
|
|
222
222
|
|
|
223
223
|
Args:
|
|
224
|
-
memory_efficient (bool): Whether to use memory-efficient version of swish.
|
|
224
|
+
memory_efficient (bool, optional): Whether to use memory-efficient version of swish.
|
|
225
225
|
|
|
226
226
|
"""
|
|
227
227
|
self._swish = MemoryEfficientSwish() if memory_efficient else Swish()
|
|
@@ -323,7 +323,7 @@ class EfficientNet(nn.Module):
|
|
|
323
323
|
|
|
324
324
|
Args:
|
|
325
325
|
model_name (str): Name for efficientnet.
|
|
326
|
-
in_channels (int): Input data's channel number.
|
|
326
|
+
in_channels (int, optional): Input data's channel number.
|
|
327
327
|
override_params (other key word params):
|
|
328
328
|
Params to override model's global_params.
|
|
329
329
|
Optional key:
|
|
@@ -349,14 +349,14 @@ class EfficientNet(nn.Module):
|
|
|
349
349
|
|
|
350
350
|
Args:
|
|
351
351
|
model_name (str): Name for efficientnet.
|
|
352
|
-
weights_path (None or str):
|
|
352
|
+
weights_path (None or str, optional):
|
|
353
353
|
str: path to pretrained weights file on the local disk.
|
|
354
354
|
None: use pretrained weights downloaded from the Internet.
|
|
355
|
-
advprop (bool):
|
|
355
|
+
advprop (bool, optional):
|
|
356
356
|
Whether to load pretrained weights
|
|
357
357
|
trained with advprop (valid when weights_path is None).
|
|
358
|
-
in_channels (int): Input data's channel number.
|
|
359
|
-
num_classes (int):
|
|
358
|
+
in_channels (int, optional): Input data's channel number.
|
|
359
|
+
num_classes (int, optional):
|
|
360
360
|
Number of categories for classification.
|
|
361
361
|
It controls the output size for final linear layer.
|
|
362
362
|
override_params (other key word params):
|
{megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/efficientnet/utils.py
RENAMED
|
@@ -194,7 +194,7 @@ def get_same_padding_conv2d(image_size=None):
|
|
|
194
194
|
Static padding is necessary for ONNX exporting of models.
|
|
195
195
|
|
|
196
196
|
Args:
|
|
197
|
-
image_size (int or tuple): Size of the image.
|
|
197
|
+
image_size (int or tuple, optional): Size of the image.
|
|
198
198
|
|
|
199
199
|
Returns:
|
|
200
200
|
Conv2dDynamicSamePadding or Conv2dStaticSamePadding.
|
|
@@ -274,7 +274,7 @@ def get_same_padding_maxPool2d(image_size=None):
|
|
|
274
274
|
Static padding is necessary for ONNX exporting of models.
|
|
275
275
|
|
|
276
276
|
Args:
|
|
277
|
-
image_size (int or tuple): Size of the image.
|
|
277
|
+
image_size (int or tuple, optional): Size of the image.
|
|
278
278
|
|
|
279
279
|
Returns:
|
|
280
280
|
MaxPool2dDynamicSamePadding or MaxPool2dStaticSamePadding.
|
|
@@ -579,11 +579,12 @@ def load_pretrained_weights(model, model_name, weights_path=None, load_fc=True,
|
|
|
579
579
|
Args:
|
|
580
580
|
model (Module): The whole model of efficientnet.
|
|
581
581
|
model_name (str): Model name of efficientnet.
|
|
582
|
-
weights_path (None or str):
|
|
582
|
+
weights_path (None or str, optional):
|
|
583
583
|
str: path to pretrained weights file on the local disk.
|
|
584
584
|
None: use pretrained weights downloaded from the Internet.
|
|
585
|
-
load_fc (bool): Whether to load pretrained weights for fc layer at the end
|
|
586
|
-
|
|
585
|
+
load_fc (bool, optional): Whether to load pretrained weights for fc layer at the end
|
|
586
|
+
of the model.
|
|
587
|
+
advprop (bool, optional): Whether to load pretrained weights
|
|
587
588
|
trained with advprop (valid when weights_path is None).
|
|
588
589
|
"""
|
|
589
590
|
if isinstance(weights_path, str):
|
|
File without changes
|
|
File without changes
|
{megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/json_to_azcopy_list.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -99,7 +99,7 @@ for fn in input_files:
|
|
|
99
99
|
crop_cmd += crop_comment
|
|
100
100
|
|
|
101
101
|
crop_cmd += "python crop_detections.py \\\n" + \
|
|
102
|
-
|
|
102
|
+
input_file_path + ' \\\n' + \
|
|
103
103
|
crop_path + ' \\\n' + \
|
|
104
104
|
'--images-dir "' + image_base + '"' + ' \\\n' + \
|
|
105
105
|
'--threshold "' + threshold_str + '"' + ' \\\n' + \
|
|
@@ -127,7 +127,7 @@ for fn in input_files:
|
|
|
127
127
|
classify_cmd += classify_comment
|
|
128
128
|
|
|
129
129
|
classify_cmd += "python run_classifier.py \\\n" + \
|
|
130
|
-
|
|
130
|
+
checkpoint_path + ' \\\n' + \
|
|
131
131
|
crop_path + ' \\\n' + \
|
|
132
132
|
classifier_output_path + ' \\\n' + \
|
|
133
133
|
'--detections-json "' + input_file_path + '"' + ' \\\n' + \
|
|
@@ -205,7 +205,7 @@ for fn in input_files:
|
|
|
205
205
|
merge_cmd += merge_comment
|
|
206
206
|
|
|
207
207
|
merge_cmd += "python merge_classification_detection_output.py \\\n" + \
|
|
208
|
-
|
|
208
|
+
classifier_output_path_remapped + ' \\\n' + \
|
|
209
209
|
output_label_index + ' \\\n' + \
|
|
210
210
|
'--output-json "' + final_output_path + '"' + ' \\\n' + \
|
|
211
211
|
'--detection-json "' + input_file_path + '"' + ' \\\n' + \
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{megadetector-5.0.29 → megadetector-10.0.1}/megadetector/classification/train_classifier_tf.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{megadetector-5.0.29 → megadetector-10.0.1}/megadetector/data_management/camtrap_dp_to_coco.py
RENAMED
|
@@ -19,6 +19,8 @@ Currently supports only sequence-level labeling.
|
|
|
19
19
|
|
|
20
20
|
import os
|
|
21
21
|
import json
|
|
22
|
+
import argparse
|
|
23
|
+
|
|
22
24
|
import pandas as pd
|
|
23
25
|
|
|
24
26
|
from dateutil import parser as dateparser
|
|
@@ -36,6 +38,10 @@ def camtrap_dp_to_coco(camtrap_dp_folder,output_file=None):
|
|
|
36
38
|
the resulting COCO file.
|
|
37
39
|
|
|
38
40
|
Optionally writes the results to [output_file]
|
|
41
|
+
|
|
42
|
+
Args:
|
|
43
|
+
camtrap_dp_folder (str): input folder, containing a CamtrapDP package
|
|
44
|
+
output_file (str, optional): COCO-formatted output file
|
|
39
45
|
"""
|
|
40
46
|
|
|
41
47
|
required_files = ('datapackage.json','deployments.csv','events.csv','media.csv','observations.csv')
|
|
@@ -234,4 +240,31 @@ if False:
|
|
|
234
240
|
|
|
235
241
|
#%% Command-line driver
|
|
236
242
|
|
|
237
|
-
|
|
243
|
+
def main():
|
|
244
|
+
"""
|
|
245
|
+
Command-line interface to convert Camtrap DP to COCO.
|
|
246
|
+
"""
|
|
247
|
+
|
|
248
|
+
parser = argparse.ArgumentParser(description='Convert Camtrap DP to COCO format')
|
|
249
|
+
parser.add_argument('camtrap_dp_folder', type=str,
|
|
250
|
+
help='Input folder, containing a CamtrapDP package')
|
|
251
|
+
parser.add_argument('--output_file', type=str, default=None,
|
|
252
|
+
help='COCO-formatted output file (defaults to [camtrap_dp_folder]_coco.json)')
|
|
253
|
+
|
|
254
|
+
args = parser.parse_args()
|
|
255
|
+
|
|
256
|
+
if args.output_file is None:
|
|
257
|
+
# Default output file name: [camtrap_dp_folder]_coco.json
|
|
258
|
+
#
|
|
259
|
+
# Remove trailing slash if present
|
|
260
|
+
folder_name = args.camtrap_dp_folder.rstrip(os.sep)
|
|
261
|
+
output_file = folder_name + '_coco.json'
|
|
262
|
+
else:
|
|
263
|
+
output_file = args.output_file
|
|
264
|
+
|
|
265
|
+
camtrap_dp_to_coco(camtrap_dp_folder=args.camtrap_dp_folder, output_file=output_file)
|
|
266
|
+
print(f"Successfully converted Camtrap DP package at '{args.camtrap_dp_folder}' to " + \
|
|
267
|
+
f"COCO format at '{output_file}'")
|
|
268
|
+
|
|
269
|
+
if __name__ == '__main__':
|
|
270
|
+
main()
|
|
@@ -418,8 +418,8 @@ def create_sequences(image_info,options=None):
|
|
|
418
418
|
image_info (str, dict, or list): a dict in CCT format, a CCT .json file, or just the
|
|
419
419
|
'images' component of a CCT dataset (a list of dicts with fields 'file_name' (str),
|
|
420
420
|
'datetime' (datetime), and 'location' (str)).
|
|
421
|
-
options (SequenceOptions): options parameterizing the assembly of images into
|
|
422
|
-
see the SequenceOptions class for details.
|
|
421
|
+
options (SequenceOptions, optional): options parameterizing the assembly of images into
|
|
422
|
+
sequences; see the SequenceOptions class for details.
|
|
423
423
|
|
|
424
424
|
Returns:
|
|
425
425
|
image_info: if [image_info] is passed as a list, returns the list, otherwise returns
|
|
File without changes
|
|
File without changes
|
|
File without changes
|