megadetector 5.0.11__py3-none-any.whl → 5.0.13__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 (203) hide show
  1. megadetector/api/__init__.py +0 -0
  2. megadetector/api/batch_processing/__init__.py +0 -0
  3. megadetector/api/batch_processing/api_core/__init__.py +0 -0
  4. megadetector/api/batch_processing/api_core/batch_service/__init__.py +0 -0
  5. megadetector/api/batch_processing/api_core/batch_service/score.py +439 -0
  6. megadetector/api/batch_processing/api_core/server.py +294 -0
  7. megadetector/api/batch_processing/api_core/server_api_config.py +97 -0
  8. megadetector/api/batch_processing/api_core/server_app_config.py +55 -0
  9. megadetector/api/batch_processing/api_core/server_batch_job_manager.py +220 -0
  10. megadetector/api/batch_processing/api_core/server_job_status_table.py +149 -0
  11. megadetector/api/batch_processing/api_core/server_orchestration.py +360 -0
  12. megadetector/api/batch_processing/api_core/server_utils.py +88 -0
  13. megadetector/api/batch_processing/api_core_support/__init__.py +0 -0
  14. megadetector/api/batch_processing/api_core_support/aggregate_results_manually.py +46 -0
  15. megadetector/api/batch_processing/api_support/__init__.py +0 -0
  16. megadetector/api/batch_processing/api_support/summarize_daily_activity.py +152 -0
  17. megadetector/api/batch_processing/data_preparation/__init__.py +0 -0
  18. megadetector/api/batch_processing/integration/digiKam/setup.py +6 -0
  19. megadetector/api/batch_processing/integration/digiKam/xmp_integration.py +465 -0
  20. megadetector/api/batch_processing/integration/eMammal/test_scripts/config_template.py +5 -0
  21. megadetector/api/batch_processing/integration/eMammal/test_scripts/push_annotations_to_emammal.py +125 -0
  22. megadetector/api/batch_processing/integration/eMammal/test_scripts/select_images_for_testing.py +55 -0
  23. megadetector/api/synchronous/__init__.py +0 -0
  24. megadetector/api/synchronous/api_core/animal_detection_api/__init__.py +0 -0
  25. megadetector/api/synchronous/api_core/animal_detection_api/api_backend.py +152 -0
  26. megadetector/api/synchronous/api_core/animal_detection_api/api_frontend.py +263 -0
  27. megadetector/api/synchronous/api_core/animal_detection_api/config.py +35 -0
  28. megadetector/api/synchronous/api_core/tests/__init__.py +0 -0
  29. megadetector/api/synchronous/api_core/tests/load_test.py +110 -0
  30. megadetector/classification/__init__.py +0 -0
  31. megadetector/classification/aggregate_classifier_probs.py +108 -0
  32. megadetector/classification/analyze_failed_images.py +227 -0
  33. megadetector/classification/cache_batchapi_outputs.py +198 -0
  34. megadetector/classification/create_classification_dataset.py +627 -0
  35. megadetector/classification/crop_detections.py +516 -0
  36. megadetector/classification/csv_to_json.py +226 -0
  37. megadetector/classification/detect_and_crop.py +855 -0
  38. megadetector/classification/efficientnet/__init__.py +9 -0
  39. megadetector/classification/efficientnet/model.py +415 -0
  40. megadetector/classification/efficientnet/utils.py +607 -0
  41. megadetector/classification/evaluate_model.py +520 -0
  42. megadetector/classification/identify_mislabeled_candidates.py +152 -0
  43. megadetector/classification/json_to_azcopy_list.py +63 -0
  44. megadetector/classification/json_validator.py +699 -0
  45. megadetector/classification/map_classification_categories.py +276 -0
  46. megadetector/classification/merge_classification_detection_output.py +506 -0
  47. megadetector/classification/prepare_classification_script.py +194 -0
  48. megadetector/classification/prepare_classification_script_mc.py +228 -0
  49. megadetector/classification/run_classifier.py +287 -0
  50. megadetector/classification/save_mislabeled.py +110 -0
  51. megadetector/classification/train_classifier.py +827 -0
  52. megadetector/classification/train_classifier_tf.py +725 -0
  53. megadetector/classification/train_utils.py +323 -0
  54. megadetector/data_management/__init__.py +0 -0
  55. megadetector/data_management/annotations/__init__.py +0 -0
  56. megadetector/data_management/annotations/annotation_constants.py +34 -0
  57. megadetector/data_management/camtrap_dp_to_coco.py +237 -0
  58. megadetector/data_management/cct_json_utils.py +404 -0
  59. megadetector/data_management/cct_to_md.py +176 -0
  60. megadetector/data_management/cct_to_wi.py +289 -0
  61. megadetector/data_management/coco_to_labelme.py +283 -0
  62. megadetector/data_management/coco_to_yolo.py +662 -0
  63. megadetector/data_management/databases/__init__.py +0 -0
  64. megadetector/data_management/databases/add_width_and_height_to_db.py +33 -0
  65. megadetector/data_management/databases/combine_coco_camera_traps_files.py +206 -0
  66. megadetector/data_management/databases/integrity_check_json_db.py +493 -0
  67. megadetector/data_management/databases/subset_json_db.py +115 -0
  68. megadetector/data_management/generate_crops_from_cct.py +149 -0
  69. megadetector/data_management/get_image_sizes.py +189 -0
  70. megadetector/data_management/importers/add_nacti_sizes.py +52 -0
  71. megadetector/data_management/importers/add_timestamps_to_icct.py +79 -0
  72. megadetector/data_management/importers/animl_results_to_md_results.py +158 -0
  73. megadetector/data_management/importers/auckland_doc_test_to_json.py +373 -0
  74. megadetector/data_management/importers/auckland_doc_to_json.py +201 -0
  75. megadetector/data_management/importers/awc_to_json.py +191 -0
  76. megadetector/data_management/importers/bellevue_to_json.py +273 -0
  77. megadetector/data_management/importers/cacophony-thermal-importer.py +793 -0
  78. megadetector/data_management/importers/carrizo_shrubfree_2018.py +269 -0
  79. megadetector/data_management/importers/carrizo_trail_cam_2017.py +289 -0
  80. megadetector/data_management/importers/cct_field_adjustments.py +58 -0
  81. megadetector/data_management/importers/channel_islands_to_cct.py +913 -0
  82. megadetector/data_management/importers/eMammal/copy_and_unzip_emammal.py +180 -0
  83. megadetector/data_management/importers/eMammal/eMammal_helpers.py +249 -0
  84. megadetector/data_management/importers/eMammal/make_eMammal_json.py +223 -0
  85. megadetector/data_management/importers/ena24_to_json.py +276 -0
  86. megadetector/data_management/importers/filenames_to_json.py +386 -0
  87. megadetector/data_management/importers/helena_to_cct.py +283 -0
  88. megadetector/data_management/importers/idaho-camera-traps.py +1407 -0
  89. megadetector/data_management/importers/idfg_iwildcam_lila_prep.py +294 -0
  90. megadetector/data_management/importers/jb_csv_to_json.py +150 -0
  91. megadetector/data_management/importers/mcgill_to_json.py +250 -0
  92. megadetector/data_management/importers/missouri_to_json.py +490 -0
  93. megadetector/data_management/importers/nacti_fieldname_adjustments.py +79 -0
  94. megadetector/data_management/importers/noaa_seals_2019.py +181 -0
  95. megadetector/data_management/importers/pc_to_json.py +365 -0
  96. megadetector/data_management/importers/plot_wni_giraffes.py +123 -0
  97. megadetector/data_management/importers/prepare-noaa-fish-data-for-lila.py +359 -0
  98. megadetector/data_management/importers/prepare_zsl_imerit.py +131 -0
  99. megadetector/data_management/importers/rspb_to_json.py +356 -0
  100. megadetector/data_management/importers/save_the_elephants_survey_A.py +320 -0
  101. megadetector/data_management/importers/save_the_elephants_survey_B.py +329 -0
  102. megadetector/data_management/importers/snapshot_safari_importer.py +758 -0
  103. megadetector/data_management/importers/snapshot_safari_importer_reprise.py +665 -0
  104. megadetector/data_management/importers/snapshot_serengeti_lila.py +1067 -0
  105. megadetector/data_management/importers/snapshotserengeti/make_full_SS_json.py +150 -0
  106. megadetector/data_management/importers/snapshotserengeti/make_per_season_SS_json.py +153 -0
  107. megadetector/data_management/importers/sulross_get_exif.py +65 -0
  108. megadetector/data_management/importers/timelapse_csv_set_to_json.py +490 -0
  109. megadetector/data_management/importers/ubc_to_json.py +399 -0
  110. megadetector/data_management/importers/umn_to_json.py +507 -0
  111. megadetector/data_management/importers/wellington_to_json.py +263 -0
  112. megadetector/data_management/importers/wi_to_json.py +442 -0
  113. megadetector/data_management/importers/zamba_results_to_md_results.py +181 -0
  114. megadetector/data_management/labelme_to_coco.py +547 -0
  115. megadetector/data_management/labelme_to_yolo.py +272 -0
  116. megadetector/data_management/lila/__init__.py +0 -0
  117. megadetector/data_management/lila/add_locations_to_island_camera_traps.py +97 -0
  118. megadetector/data_management/lila/add_locations_to_nacti.py +147 -0
  119. megadetector/data_management/lila/create_lila_blank_set.py +558 -0
  120. megadetector/data_management/lila/create_lila_test_set.py +152 -0
  121. megadetector/data_management/lila/create_links_to_md_results_files.py +106 -0
  122. megadetector/data_management/lila/download_lila_subset.py +178 -0
  123. megadetector/data_management/lila/generate_lila_per_image_labels.py +516 -0
  124. megadetector/data_management/lila/get_lila_annotation_counts.py +170 -0
  125. megadetector/data_management/lila/get_lila_image_counts.py +112 -0
  126. megadetector/data_management/lila/lila_common.py +300 -0
  127. megadetector/data_management/lila/test_lila_metadata_urls.py +132 -0
  128. megadetector/data_management/ocr_tools.py +870 -0
  129. megadetector/data_management/read_exif.py +809 -0
  130. megadetector/data_management/remap_coco_categories.py +84 -0
  131. megadetector/data_management/remove_exif.py +66 -0
  132. megadetector/data_management/rename_images.py +187 -0
  133. megadetector/data_management/resize_coco_dataset.py +189 -0
  134. megadetector/data_management/wi_download_csv_to_coco.py +247 -0
  135. megadetector/data_management/yolo_output_to_md_output.py +446 -0
  136. megadetector/data_management/yolo_to_coco.py +676 -0
  137. megadetector/detection/__init__.py +0 -0
  138. megadetector/detection/detector_training/__init__.py +0 -0
  139. megadetector/detection/detector_training/model_main_tf2.py +114 -0
  140. megadetector/detection/process_video.py +846 -0
  141. megadetector/detection/pytorch_detector.py +355 -0
  142. megadetector/detection/run_detector.py +779 -0
  143. megadetector/detection/run_detector_batch.py +1219 -0
  144. megadetector/detection/run_inference_with_yolov5_val.py +1087 -0
  145. megadetector/detection/run_tiled_inference.py +934 -0
  146. megadetector/detection/tf_detector.py +192 -0
  147. megadetector/detection/video_utils.py +698 -0
  148. megadetector/postprocessing/__init__.py +0 -0
  149. megadetector/postprocessing/add_max_conf.py +64 -0
  150. megadetector/postprocessing/categorize_detections_by_size.py +165 -0
  151. megadetector/postprocessing/classification_postprocessing.py +716 -0
  152. megadetector/postprocessing/combine_api_outputs.py +249 -0
  153. megadetector/postprocessing/compare_batch_results.py +966 -0
  154. megadetector/postprocessing/convert_output_format.py +396 -0
  155. megadetector/postprocessing/load_api_results.py +195 -0
  156. megadetector/postprocessing/md_to_coco.py +310 -0
  157. megadetector/postprocessing/md_to_labelme.py +330 -0
  158. megadetector/postprocessing/merge_detections.py +412 -0
  159. megadetector/postprocessing/postprocess_batch_results.py +1908 -0
  160. megadetector/postprocessing/remap_detection_categories.py +170 -0
  161. megadetector/postprocessing/render_detection_confusion_matrix.py +660 -0
  162. megadetector/postprocessing/repeat_detection_elimination/find_repeat_detections.py +211 -0
  163. megadetector/postprocessing/repeat_detection_elimination/remove_repeat_detections.py +83 -0
  164. megadetector/postprocessing/repeat_detection_elimination/repeat_detections_core.py +1635 -0
  165. megadetector/postprocessing/separate_detections_into_folders.py +730 -0
  166. megadetector/postprocessing/subset_json_detector_output.py +700 -0
  167. megadetector/postprocessing/top_folders_to_bottom.py +223 -0
  168. megadetector/taxonomy_mapping/__init__.py +0 -0
  169. megadetector/taxonomy_mapping/map_lila_taxonomy_to_wi_taxonomy.py +491 -0
  170. megadetector/taxonomy_mapping/map_new_lila_datasets.py +150 -0
  171. megadetector/taxonomy_mapping/prepare_lila_taxonomy_release.py +142 -0
  172. megadetector/taxonomy_mapping/preview_lila_taxonomy.py +588 -0
  173. megadetector/taxonomy_mapping/retrieve_sample_image.py +71 -0
  174. megadetector/taxonomy_mapping/simple_image_download.py +219 -0
  175. megadetector/taxonomy_mapping/species_lookup.py +834 -0
  176. megadetector/taxonomy_mapping/taxonomy_csv_checker.py +159 -0
  177. megadetector/taxonomy_mapping/taxonomy_graph.py +346 -0
  178. megadetector/taxonomy_mapping/validate_lila_category_mappings.py +83 -0
  179. megadetector/utils/__init__.py +0 -0
  180. megadetector/utils/azure_utils.py +178 -0
  181. megadetector/utils/ct_utils.py +613 -0
  182. megadetector/utils/directory_listing.py +246 -0
  183. megadetector/utils/md_tests.py +1164 -0
  184. megadetector/utils/path_utils.py +1045 -0
  185. megadetector/utils/process_utils.py +160 -0
  186. megadetector/utils/sas_blob_utils.py +509 -0
  187. megadetector/utils/split_locations_into_train_val.py +228 -0
  188. megadetector/utils/string_utils.py +92 -0
  189. megadetector/utils/url_utils.py +323 -0
  190. megadetector/utils/write_html_image_list.py +225 -0
  191. megadetector/visualization/__init__.py +0 -0
  192. megadetector/visualization/plot_utils.py +293 -0
  193. megadetector/visualization/render_images_with_thumbnails.py +275 -0
  194. megadetector/visualization/visualization_utils.py +1536 -0
  195. megadetector/visualization/visualize_db.py +552 -0
  196. megadetector/visualization/visualize_detector_output.py +405 -0
  197. {megadetector-5.0.11.dist-info → megadetector-5.0.13.dist-info}/LICENSE +0 -0
  198. {megadetector-5.0.11.dist-info → megadetector-5.0.13.dist-info}/METADATA +2 -2
  199. megadetector-5.0.13.dist-info/RECORD +201 -0
  200. megadetector-5.0.13.dist-info/top_level.txt +1 -0
  201. megadetector-5.0.11.dist-info/RECORD +0 -5
  202. megadetector-5.0.11.dist-info/top_level.txt +0 -1
  203. {megadetector-5.0.11.dist-info → megadetector-5.0.13.dist-info}/WHEEL +0 -0
@@ -0,0 +1,405 @@
1
+ """
2
+
3
+ visualize_detector_output.py
4
+
5
+ Render images with bounding boxes annotated on them to a folder, based on a
6
+ detector output result file (.json), optionally writing an HTML index file.
7
+
8
+ """
9
+
10
+ #%% Imports
11
+
12
+ import argparse
13
+ import json
14
+ import os
15
+ import random
16
+ import sys
17
+
18
+ from multiprocessing.pool import ThreadPool
19
+ from multiprocessing.pool import Pool
20
+ from functools import partial
21
+ from tqdm import tqdm
22
+
23
+ from megadetector.data_management.annotations.annotation_constants import detector_bbox_category_id_to_name
24
+ from megadetector.visualization import visualization_utils as vis_utils
25
+ from megadetector.utils.ct_utils import get_max_conf
26
+ from megadetector.utils import write_html_image_list
27
+ from megadetector.detection.run_detector import get_typical_confidence_threshold_from_results
28
+
29
+
30
+ #%% Constants
31
+
32
+ # This will only be used if a category mapping is not available in the results file.
33
+ DEFAULT_DETECTOR_LABEL_MAP = {
34
+ str(k): v for k, v in detector_bbox_category_id_to_name.items()
35
+ }
36
+
37
+
38
+ #%% Support functions
39
+
40
+ def _render_image(entry,
41
+ detector_label_map,classification_label_map,
42
+ confidence_threshold,classification_confidence_threshold,
43
+ render_detections_only,preserve_path_structure,out_dir,images_dir,
44
+ output_image_width):
45
+ """
46
+ Internal function for rendering a single image.
47
+ """
48
+
49
+ rendering_result = {'failed_image':False,'missing_image':False,
50
+ 'skipped_image':False,'annotated_image_path':None,
51
+ 'max_conf':None,'file':entry['file']}
52
+
53
+ image_id = entry['file']
54
+
55
+ if 'failure' in entry and entry['failure'] is not None:
56
+ rendering_result['failed_image'] = True
57
+ return rendering_result
58
+
59
+ assert 'detections' in entry and entry['detections'] is not None
60
+
61
+ max_conf = get_max_conf(entry)
62
+ rendering_result['max_conf'] = max_conf
63
+
64
+ if (max_conf < confidence_threshold) and render_detections_only:
65
+ rendering_result['skipped_image'] = True
66
+ return rendering_result
67
+
68
+ image_obj = os.path.join(images_dir, image_id)
69
+ if not os.path.exists(image_obj):
70
+ print(f'Image {image_id} not found in images_dir')
71
+ rendering_result['missing_image'] = True
72
+ return rendering_result
73
+
74
+ # If output_image_width is -1 or None, this will just return the original image
75
+ image = vis_utils.resize_image(
76
+ vis_utils.open_image(image_obj), output_image_width)
77
+
78
+ vis_utils.render_detection_bounding_boxes(
79
+ entry['detections'], image,
80
+ label_map=detector_label_map,
81
+ classification_label_map=classification_label_map,
82
+ confidence_threshold=confidence_threshold,
83
+ classification_confidence_threshold=classification_confidence_threshold)
84
+
85
+ if not preserve_path_structure:
86
+ for char in ['/', '\\', ':']:
87
+ image_id = image_id.replace(char, '~')
88
+ annotated_img_path = os.path.join(out_dir, f'anno_{image_id}')
89
+ else:
90
+ assert not os.path.isabs(image_id), "Can't preserve paths when operating on absolute paths"
91
+ annotated_img_path = os.path.join(out_dir, image_id)
92
+ os.makedirs(os.path.dirname(annotated_img_path),exist_ok=True)
93
+
94
+ image.save(annotated_img_path)
95
+ rendering_result['annotated_image_path'] = annotated_img_path
96
+
97
+ return rendering_result
98
+
99
+
100
+ #%% Main function
101
+
102
+ def visualize_detector_output(detector_output_path,
103
+ out_dir,
104
+ images_dir,
105
+ confidence_threshold=0.15,
106
+ sample=-1,
107
+ output_image_width=700,
108
+ random_seed=None,
109
+ render_detections_only=False,
110
+ classification_confidence_threshold=0.1,
111
+ html_output_file=None,
112
+ html_output_options=None,
113
+ preserve_path_structure=False,
114
+ parallelize_rendering=False,
115
+ parallelize_rendering_n_cores=10,
116
+ parallelize_rendering_with_threads=True):
117
+
118
+ """
119
+ Draws bounding boxes on images given the output of a detector.
120
+
121
+ Args:
122
+ detector_output_path (str): path to detector output .json file
123
+ out_dir (str): path to directory for saving annotated images
124
+ images_dir (str): folder where the images live; filenames in
125
+ [detector_output_path] should be relative to [image_dir]
126
+ confidence_threshold (float, optional): threshold above which detections will be rendered
127
+ sample (int, optional): maximum number of images to render, -1 for all
128
+ output_image_width (int, optional): width in pixels to resize images for display,
129
+ preserving aspect ration; set to -1 to use original image width
130
+ random_seed (int, optional): seed to use for choosing images when sample != -1
131
+ render_detections_only (bool): only render images with above-threshold detections
132
+ classification_confidence_threshold (float, optional): only show classifications
133
+ above this threshold; does not impact whether images are rendered, only whether
134
+ classification labels (not detection categories) are displayed
135
+ html_output_file (str, optional): output path for an HTML index file (not written
136
+ if None)
137
+ html_output_options (dict, optional): HTML formatting options; see write_html_image_list
138
+ for details
139
+ preserve_path_structure (bool, optional): if False (default), writes images to unique
140
+ names in a flat structure in the output folder; if True, preserves relative paths
141
+ within the output folder
142
+ parallelize_rendering (bool, optional): whether to use concurrent workers for rendering
143
+ parallelize_rendering_n_cores (int, optional): number of concurrent workers to use
144
+ (ignored if parallelize_rendering is False)
145
+ parallelize_rendering_with_threads (bool, optional): determines whether we use
146
+ threads (True) or processes (False) for parallelization (ignored if parallelize_rendering
147
+ is False)
148
+
149
+ Returns:
150
+ list: list of paths to annotated images
151
+ """
152
+
153
+ assert os.path.exists(detector_output_path), \
154
+ 'Detector output file does not exist at {}'.format(detector_output_path)
155
+
156
+ assert os.path.isdir(images_dir), \
157
+ 'Image folder {} is not available'.format(images_dir)
158
+
159
+ os.makedirs(out_dir, exist_ok=True)
160
+
161
+
162
+ ##%% Load detector output
163
+
164
+ with open(detector_output_path) as f:
165
+ detector_output = json.load(f)
166
+ assert 'images' in detector_output, (
167
+ 'Detector output file should be a json with an "images" field.')
168
+ images = detector_output['images']
169
+
170
+ if confidence_threshold is None:
171
+ confidence_threshold = get_typical_confidence_threshold_from_results(detector_output)
172
+
173
+ assert confidence_threshold >= 0 and confidence_threshold <= 1, (
174
+ f'Confidence threshold {confidence_threshold} is invalid, must be in (0, 1).')
175
+
176
+ if 'detection_categories' in detector_output:
177
+ print('Using custom label mapping')
178
+ detector_label_map = detector_output['detection_categories']
179
+ else:
180
+ detector_label_map = DEFAULT_DETECTOR_LABEL_MAP
181
+
182
+ num_images = len(images)
183
+ print(f'Detector output file contains {num_images} entries.')
184
+
185
+ if sample > 0:
186
+ assert num_images >= sample, (
187
+ f'Sample size {sample} greater than number of entries '
188
+ f'({num_images}) in detector result.')
189
+
190
+ if random_seed is not None:
191
+ images = sorted(images, key=lambda x: x['file'])
192
+ random.seed(random_seed)
193
+
194
+ random.shuffle(images)
195
+ images = sorted(images[:sample], key=lambda x: x['file'])
196
+ print(f'Sampled {len(images)} entries from the detector output file.')
197
+
198
+
199
+ ##%% Load images, annotate them and save
200
+
201
+ print('Rendering detections above a confidence threshold of {}'.format(
202
+ confidence_threshold))
203
+
204
+ classification_label_map = None
205
+
206
+ if 'classification_categories' in detector_output:
207
+ classification_label_map = detector_output['classification_categories']
208
+
209
+ rendering_results = []
210
+
211
+ if parallelize_rendering:
212
+
213
+ if parallelize_rendering_with_threads:
214
+ worker_string = 'threads'
215
+ else:
216
+ worker_string = 'processes'
217
+
218
+ if parallelize_rendering_n_cores is None:
219
+ if parallelize_rendering_with_threads:
220
+ pool = ThreadPool()
221
+ else:
222
+ pool = Pool()
223
+ else:
224
+ if parallelize_rendering_with_threads:
225
+ pool = ThreadPool(parallelize_rendering_n_cores)
226
+ else:
227
+ pool = Pool(parallelize_rendering_n_cores)
228
+ print('Rendering images with {} {}'.format(parallelize_rendering_n_cores,
229
+ worker_string))
230
+ rendering_results = list(tqdm(pool.imap(
231
+ partial(_render_image,detector_label_map=detector_label_map,
232
+ classification_label_map=classification_label_map,
233
+ confidence_threshold=confidence_threshold,
234
+ classification_confidence_threshold=classification_confidence_threshold,
235
+ render_detections_only=render_detections_only,
236
+ preserve_path_structure=preserve_path_structure,
237
+ out_dir=out_dir,
238
+ images_dir=images_dir,
239
+ output_image_width=output_image_width),
240
+ images), total=len(images)))
241
+
242
+ else:
243
+
244
+ for entry in tqdm(images):
245
+
246
+ rendering_result = _render_image(entry,detector_label_map,classification_label_map,
247
+ confidence_threshold,classification_confidence_threshold,
248
+ render_detections_only,preserve_path_structure,out_dir,
249
+ images_dir,output_image_width)
250
+ rendering_results.append(rendering_result)
251
+
252
+ # ...for each image
253
+
254
+ failed_images = [r for r in rendering_results if r['failed_image']]
255
+ missing_images = [r for r in rendering_results if r['missing_image']]
256
+ skipped_images = [r for r in rendering_results if r['skipped_image']]
257
+
258
+ print('Skipped {} failed images (of {})'.format(len(failed_images),len(images)))
259
+ print('Skipped {} missing images (of {})'.format(len(missing_images),len(images)))
260
+ print('Skipped {} below-threshold images (of {})'.format(len(skipped_images),len(images)))
261
+
262
+ print(f'Rendered detection results to {out_dir}')
263
+
264
+ annotated_image_paths = [r['annotated_image_path'] for r in rendering_results if \
265
+ r['annotated_image_path'] is not None]
266
+
267
+ if html_output_file is not None:
268
+
269
+ html_dir = os.path.dirname(html_output_file)
270
+
271
+ html_image_info = []
272
+
273
+ for r in rendering_results:
274
+ d = {}
275
+ annotated_image_path_relative = os.path.relpath(r['annotated_image_path'],html_dir)
276
+ d['filename'] = annotated_image_path_relative
277
+ d['textStyle'] = \
278
+ 'font-family:verdana,arial,calibri;font-size:80%;' + \
279
+ 'text-align:left;margin-top:20;margin-bottom:5'
280
+ d['title'] = '{} (max conf: {})'.format(r['file'],r['max_conf'])
281
+ html_image_info.append(d)
282
+
283
+ _ = write_html_image_list.write_html_image_list(html_output_file,html_image_info,
284
+ options=html_output_options)
285
+
286
+ return annotated_image_paths
287
+
288
+
289
+ #%% Command-line driver
290
+
291
+ def main():
292
+
293
+ parser = argparse.ArgumentParser(
294
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter,
295
+ description='Annotate the bounding boxes predicted by a detector above '
296
+ 'some confidence threshold, and save the annotated images.')
297
+ parser.add_argument(
298
+ 'detector_output_path', type=str,
299
+ help='Path to json output file of the detector')
300
+ parser.add_argument(
301
+ 'out_dir', type=str,
302
+ help='Path to directory where the annotated images will be saved. '
303
+ 'The directory will be created if it does not exist.')
304
+ parser.add_argument(
305
+ '-c', '--confidence', type=float, default=0.15,
306
+ help='Value between 0 and 1, indicating the confidence threshold '
307
+ 'above which to visualize bounding boxes')
308
+ parser.add_argument(
309
+ '-i', '--images_dir', type=str, default=None,
310
+ help='Path to a local directory where images are stored. This '
311
+ 'serves as the root directory for image paths in '
312
+ 'detector_output_path.')
313
+ parser.add_argument(
314
+ '-n', '--sample', type=int, default=-1,
315
+ help='Number of images to be annotated and rendered. Set to -1 '
316
+ '(default) to annotate all images in the detector output file. '
317
+ 'There may be fewer images if some are not found in images_dir.')
318
+ parser.add_argument(
319
+ '-w', '--output_image_width', type=int, default=700,
320
+ help='Integer, desired width in pixels of the output annotated images. '
321
+ 'Use -1 to not resize. Default: 700.')
322
+ parser.add_argument(
323
+ '-r', '--random_seed', type=int, default=None,
324
+ help='Integer, for deterministic order of image sampling')
325
+ parser.add_argument(
326
+ '-html', '--html_output_file', type=str, default=None,
327
+ help='Filename to which we should write an HTML image index (off by default)')
328
+ parser.add_argument(
329
+ '--open_html_output_file', action='store_true',
330
+ help='Open the .html output file when done')
331
+ parser.add_argument(
332
+ '-do', '--detections_only', action='store_true',
333
+ help='Only render images with above-threshold detections (by default, '
334
+ 'both empty and non-empty images are rendered).')
335
+ parser.add_argument(
336
+ '-pps', '--preserve_path_structure', action='store_true',
337
+ help='Preserve relative image paths (otherwise flattens and assigns unique file names)')
338
+
339
+ if len(sys.argv[1:]) == 0:
340
+ parser.print_help()
341
+ parser.exit()
342
+
343
+ args = parser.parse_args()
344
+ visualize_detector_output(
345
+ detector_output_path=args.detector_output_path,
346
+ out_dir=args.out_dir,
347
+ confidence_threshold=args.confidence,
348
+ images_dir=args.images_dir,
349
+ sample=args.sample,
350
+ output_image_width=args.output_image_width,
351
+ random_seed=args.random_seed,
352
+ render_detections_only=args.detections_only,
353
+ preserve_path_structure=args.preserve_path_structure,
354
+ html_output_file=args.html_output_file)
355
+
356
+ if args.html_output_file is not None and args.open_html_output_file:
357
+ from megadetector.utils.path_utils import open_file
358
+ open_file(args.html_output_file)
359
+
360
+ if __name__ == '__main__':
361
+ main()
362
+
363
+
364
+ #%% Interactive driver
365
+
366
+ if False:
367
+
368
+ pass
369
+
370
+ #%%
371
+
372
+ detector_output_path = os.path.expanduser('~/postprocessing/bellevue-camera-traps/bellevue-camera-traps-2023-12-05-v5a.0.0/combined_api_outputs/bellevue-camera-traps-2023-12-05-v5a.0.0_detections.json')
373
+ out_dir = r'g:\temp\preview'
374
+ images_dir = r'g:\camera_traps\camera_trap_images'
375
+ confidence_threshold = 0.15
376
+ sample = 50
377
+ output_image_width = 700
378
+ random_seed = 1
379
+ render_detections_only = True
380
+ classification_confidence_threshold = 0.1
381
+ html_output_file = os.path.join(out_dir,'index.html')
382
+ html_output_options = None
383
+ preserve_path_structure = False
384
+ parallelize_rendering = True
385
+ parallelize_rendering_n_cores = 10
386
+ parallelize_rendering_with_threads = False
387
+
388
+ _ = visualize_detector_output(detector_output_path,
389
+ out_dir,
390
+ images_dir,
391
+ confidence_threshold,
392
+ sample,
393
+ output_image_width,
394
+ random_seed,
395
+ render_detections_only,
396
+ classification_confidence_threshold,
397
+ html_output_file,
398
+ html_output_options,
399
+ preserve_path_structure,
400
+ parallelize_rendering,
401
+ parallelize_rendering_n_cores,
402
+ parallelize_rendering_with_threads)
403
+
404
+ from megadetector.utils.path_utils import open_file
405
+ open_file(html_output_file)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: megadetector
3
- Version: 5.0.11
3
+ Version: 5.0.13
4
4
  Summary: MegaDetector is an AI model that helps conservation folks spend less time doing boring things with camera trap images.
5
5
  Author-email: Your friendly neighborhood MegaDetector team <cameratraps@lila.science>
6
6
  Maintainer-email: Your friendly neighborhood MegaDetector team <cameratraps@lila.science>
@@ -114,7 +114,7 @@ print('Found {} detections above threshold'.format(len(detections_above_threshol
114
114
 
115
115
  ```
116
116
  from megadetector.detection.run_detector_batch import \
117
- load_and_run_detector_batch,write_results_to_file
117
+ load_and_run_detector_batch, write_results_to_file
118
118
  from megadetector.utils import path_utils
119
119
  import os
120
120
 
@@ -0,0 +1,201 @@
1
+ megadetector/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ megadetector/api/batch_processing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ megadetector/api/batch_processing/api_core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ megadetector/api/batch_processing/api_core/server.py,sha256=-g6hfaSp7dUaT-2-bUSXkLE-MJnig3gZ3W_GbNkoAE0,11618
5
+ megadetector/api/batch_processing/api_core/server_api_config.py,sha256=AjmLStXYoMMwxZJSephYROEprcSkG5RPlOr7Zho9xLk,3277
6
+ megadetector/api/batch_processing/api_core/server_app_config.py,sha256=tQCFsFv0wJCegHfnu-Za3okdXwEd4U522hiM0YGNkMY,1860
7
+ megadetector/api/batch_processing/api_core/server_batch_job_manager.py,sha256=K7fMFBJA8Z1SkA4eBM-nymcq7VQjwZ6ZRaNnNKFlat8,10324
8
+ megadetector/api/batch_processing/api_core/server_job_status_table.py,sha256=P621Df7RTTKqW8VlxnCqkBtIO4Ko5bSS6WbU0ETzPGY,5984
9
+ megadetector/api/batch_processing/api_core/server_orchestration.py,sha256=LYHABzhOvP0NrM1VIjI6Vwb95YZ5xjQ52mUJW8oIOQ0,17003
10
+ megadetector/api/batch_processing/api_core/server_utils.py,sha256=uJvnW50lSE_LnRtEyrFI2dbVSecmGudaRhUH6NcAx1M,3100
11
+ megadetector/api/batch_processing/api_core/batch_service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
+ megadetector/api/batch_processing/api_core/batch_service/score.py,sha256=_hjUBIe0s9wmpmQwwDg-fd7tJMCn8735zJcgF15mTFo,17354
13
+ megadetector/api/batch_processing/api_core_support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
+ megadetector/api/batch_processing/api_core_support/aggregate_results_manually.py,sha256=pPLRVb54kMzcndiRQx0JGna3v9cSX__hBc_7PZ8NFEU,2274
15
+ megadetector/api/batch_processing/api_support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
+ megadetector/api/batch_processing/api_support/summarize_daily_activity.py,sha256=5H3DyXtdIW5uCp09Fbu9Tdf0hgfNKYnzv7v8Q7CPsDc,5382
17
+ megadetector/api/batch_processing/data_preparation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
+ megadetector/api/batch_processing/integration/digiKam/setup.py,sha256=7P1X3JYrBDXmLUeLRrzxNfDkL5lo-pY8nXsp9Cz8rOI,203
19
+ megadetector/api/batch_processing/integration/digiKam/xmp_integration.py,sha256=zk5s7dD-FIkNnRxECT-0TAuBw7R__Or5_ft7Ha3iqMM,17774
20
+ megadetector/api/batch_processing/integration/eMammal/test_scripts/config_template.py,sha256=UnvrgaFRBu59MuVUJa2WpG8ebcOJWcNeZEx6GWuYLzc,73
21
+ megadetector/api/batch_processing/integration/eMammal/test_scripts/push_annotations_to_emammal.py,sha256=keqru1Ktbrj6J6TBEUm3e5N0Ps_0G2X4u4YVavWvDiU,3576
22
+ megadetector/api/batch_processing/integration/eMammal/test_scripts/select_images_for_testing.py,sha256=OYMu97p8vprSv03QcnS6aSxPBocn9sgaozfUqq_JpyM,1369
23
+ megadetector/api/synchronous/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
+ megadetector/api/synchronous/api_core/animal_detection_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
+ megadetector/api/synchronous/api_core/animal_detection_api/api_backend.py,sha256=6fo9k1byFZdxeHzov-qNFD1ZMClXPIG-BBUlZlbHoMw,4929
26
+ megadetector/api/synchronous/api_core/animal_detection_api/api_frontend.py,sha256=f16J7OBN87Tv0vVIIpXlyyVDeT6qYXDe5Kpr5XGqhdQ,10233
27
+ megadetector/api/synchronous/api_core/animal_detection_api/config.py,sha256=05fVcLx0KK3wWFi62Mr-m_soewVn81qqeObUh-a2mrA,982
28
+ megadetector/api/synchronous/api_core/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
+ megadetector/api/synchronous/api_core/tests/load_test.py,sha256=bxyk3Oufl0V79vRsCPeRtWlE2o2KRtVgiqs7TSyP-iU,3277
30
+ megadetector/classification/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
+ megadetector/classification/aggregate_classifier_probs.py,sha256=gj6PBCe12Z05r3FbOHXuNJHPWyIogoQJvt4kFzApOqg,3429
32
+ megadetector/classification/analyze_failed_images.py,sha256=boY5MupCWEceHHpiJ4au7Rhz8bzmABlTz2B5w08V2qQ,8446
33
+ megadetector/classification/cache_batchapi_outputs.py,sha256=PvbQZYjskIUlzqQl3TDs0bptqCS37rmU14Ix9a5TPRE,6308
34
+ megadetector/classification/create_classification_dataset.py,sha256=bxj3SRyARQfP2ohRT7zEdge_hfs8iBnDETGQWcvNBuI,25467
35
+ megadetector/classification/crop_detections.py,sha256=gFqUch8iapeqlgSU7VSDBB3LgetyyfX5xU3lI9o4Ulk,20438
36
+ megadetector/classification/csv_to_json.py,sha256=hXxUqM92e9AtZVk_BkkjHNi2gMkXHpwmDnYv_uplLxA,5889
37
+ megadetector/classification/detect_and_crop.py,sha256=1rdR9uEURwNO6CAPdRuOc3SmiBLNMwYPUYcMaV3mLWI,37029
38
+ megadetector/classification/evaluate_model.py,sha256=ed6LrBo-U49Q_0tbaEExVZI3GOdA1BVUnc01WwCDUzU,19320
39
+ megadetector/classification/identify_mislabeled_candidates.py,sha256=zOWHmWeaiOpM9c0s1uHOKgxJSHyJJR-oAM4R6f1c7T0,5032
40
+ megadetector/classification/json_to_azcopy_list.py,sha256=146gUlCOMw5oaiZzNR2z0q1-gn6q56hkxIfY4lMiPVE,1670
41
+ megadetector/classification/json_validator.py,sha256=uLHWs9X1r_Hi5Gq7zqpQYl6mDc_7M2KAnbmU5Hu_EXs,26553
42
+ megadetector/classification/map_classification_categories.py,sha256=2vAfbVnVtyq38SuHpdo3H_kjt8ZGc6FUOyl50VxHjMM,10679
43
+ megadetector/classification/merge_classification_detection_output.py,sha256=UxoEw1wvuv2ZsvpAbCqlxwkphy__CmKb-8YDnaLrLIk,20021
44
+ megadetector/classification/prepare_classification_script.py,sha256=zE8j3wi8YJBkEnuqkIb-SK8xoEnAu-XtlkSiO8-zpdQ,6510
45
+ megadetector/classification/prepare_classification_script_mc.py,sha256=zQV6Vlr0cQxPrFLNk33RlPKAFPA4VuhlHsz-FtAIWv4,7190
46
+ megadetector/classification/run_classifier.py,sha256=8PtkQzCUceOyoYxMfriJzA9ZLz_-YAd3OEr2865i3SM,9339
47
+ megadetector/classification/save_mislabeled.py,sha256=gNcMK7zVo-Q4XChiB-zVJMcwE6uDz6r4EgQA0KaE5sI,3408
48
+ megadetector/classification/train_classifier.py,sha256=Ps-I7clNZsXht8yLjXP2ZSiqCMZqXYhzuldSkPsuW64,32338
49
+ megadetector/classification/train_classifier_tf.py,sha256=aounVoV20Iz1X5VZzKfJEacUeXfA8o6DBGm0yrxPT08,28091
50
+ megadetector/classification/train_utils.py,sha256=5XnwPGtIjtDFu4xend8BH97zYhulUhF0BJHA-uYzojg,11333
51
+ megadetector/classification/efficientnet/__init__.py,sha256=e-jfknjzCc5a0CSW-TaZ2vi0SPU1OMIsayoz2s94QAo,182
52
+ megadetector/classification/efficientnet/model.py,sha256=qJHWV9-rYKa4E_TIee5N_OjRhqDdM-icPpoMap3Q5HM,17040
53
+ megadetector/classification/efficientnet/utils.py,sha256=dzrDrQQcvINdJFbODmrHQMUaM0RaUbct52zcSprseAg,24693
54
+ megadetector/data_management/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
+ megadetector/data_management/camtrap_dp_to_coco.py,sha256=WC5u5nK5BwXpV26_pGy6CppQryJMgsJ9NtDbGIRQqLg,8629
56
+ megadetector/data_management/cct_json_utils.py,sha256=LuNbxU5EAslWanC08PTKzwzCUmesGnbbJhZ1e2dCgnI,15140
57
+ megadetector/data_management/cct_to_md.py,sha256=BvQ24XlYhgMYFcsvo6btR1k1UsiPL1vBoxegooJbxdA,5070
58
+ megadetector/data_management/cct_to_wi.py,sha256=hnFErIlBDmhZtBv21kDW14MSdHlUjwtCGn2vnG-cN34,9771
59
+ megadetector/data_management/coco_to_labelme.py,sha256=Uql6f1TaMmKIZClCcqUB1bPxokdXgyAKsQm5pk5foKk,8986
60
+ megadetector/data_management/coco_to_yolo.py,sha256=rTDOh3XdoOoo7HCSH7obT3xpQgiSykf71ba8uOXfnxc,28121
61
+ megadetector/data_management/generate_crops_from_cct.py,sha256=Esq2Vlvp1AQvD8bmtC15OvoTZTHASBfcIVIuisxXT08,4383
62
+ megadetector/data_management/get_image_sizes.py,sha256=2b6arj4gvoN-9f61lC3t1zAFFwYFxfb2iL83Tstoiik,6602
63
+ megadetector/data_management/labelme_to_coco.py,sha256=8RUXALXbLpmS7UYUet4BAe9JVSDW7ojwDDpxYs072ZI,21231
64
+ megadetector/data_management/labelme_to_yolo.py,sha256=dRePSOwU_jiCr0EakDQCz1Ct-ZHDxDglUk4HbM1LfWc,10034
65
+ megadetector/data_management/ocr_tools.py,sha256=T9ClY3B-blnK3-UF1vpVdageknYsykm_6FAfqn0kliU,32529
66
+ megadetector/data_management/read_exif.py,sha256=BgV5SMZbPUoBdh0Mxljwzat_zO7B4xiD1liddbGV8gE,27635
67
+ megadetector/data_management/remap_coco_categories.py,sha256=xXWv0QhTjkUfc9RKtAZanK77HMSq_21mFg_34KFD6hw,2903
68
+ megadetector/data_management/remove_exif.py,sha256=9YwMUliszhVzkkUcotpRKA-a3h5WdQF1taQ594Bgm60,1666
69
+ megadetector/data_management/rename_images.py,sha256=AG3YIxXEYdGmK4G-rv0_XZIylPqOZpS6gfEkydF6oDg,6918
70
+ megadetector/data_management/resize_coco_dataset.py,sha256=AaiV7efIcNnqsXsnQckmHq2G__7ZQHBV_jN6rhZfMjo,6810
71
+ megadetector/data_management/wi_download_csv_to_coco.py,sha256=ilnJZhNZK-FGUR-AfUSWjIDUk9Gytgxw7IOK_N8WKLE,8350
72
+ megadetector/data_management/yolo_output_to_md_output.py,sha256=VZtatLoryeh2pbh1fRAJe-ao7vtoNn6ACyRbAk-2Mlg,17561
73
+ megadetector/data_management/yolo_to_coco.py,sha256=G9XiB9D8PWaCq_kc61pKe2GkkuKwdJ7K7zsbGShb_jw,25176
74
+ megadetector/data_management/annotations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
75
+ megadetector/data_management/annotations/annotation_constants.py,sha256=1597MpAr_HdidIHoDFj4RgUO3K5e2Xm2bGafGeonR2k,953
76
+ megadetector/data_management/databases/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
77
+ megadetector/data_management/databases/add_width_and_height_to_db.py,sha256=X7A_iniGwlkhZ0jUNm564GT_mH2_RJGLD0aGP9cBhY0,749
78
+ megadetector/data_management/databases/combine_coco_camera_traps_files.py,sha256=oeELrMgxhsJ6aNBxPQyu4CmsdtYnzS5GKZEV8U-XUdk,6693
79
+ megadetector/data_management/databases/integrity_check_json_db.py,sha256=A8AAlpfAbbthUH3ZOQrvRjzliMl2RS8g764Nk7Ypuqk,17109
80
+ megadetector/data_management/databases/subset_json_db.py,sha256=JK71qSUpUZe7cJquyt2xEzirDoZq1Lrr2X0cgtHKBpA,3219
81
+ megadetector/data_management/importers/add_nacti_sizes.py,sha256=jjGTpd36g5w7nLIeOatXRwu1Uti2GiGgP3-61QSg8oA,1156
82
+ megadetector/data_management/importers/add_timestamps_to_icct.py,sha256=5l1TkWq3X4Mxed7zlZ07U1RQcjbzBnwcoftNiaruigM,2364
83
+ megadetector/data_management/importers/animl_results_to_md_results.py,sha256=duvQkfFzONYHdTsJrhHyufpamK55r41IjkjFuPY7WmE,4698
84
+ megadetector/data_management/importers/auckland_doc_test_to_json.py,sha256=tT4XnvY3c5idDkQByfN6Z646CNiCprS-75ytjbMbnVY,12911
85
+ megadetector/data_management/importers/auckland_doc_to_json.py,sha256=EoNsAJvzTwcgHspE05eO0LHazMVYM7-yzFBit0FiJWk,5970
86
+ megadetector/data_management/importers/awc_to_json.py,sha256=e1HjShGS2WC-l99FV89g1u0o2v5990Vh9XsjIukg6qQ,5327
87
+ megadetector/data_management/importers/bellevue_to_json.py,sha256=oJMSF0r_snRXtppiwFy4vvP8gErEw6_7Kv1UJs59QLo,7919
88
+ megadetector/data_management/importers/cacophony-thermal-importer.py,sha256=4o7gyX-uUlS3rkQZlOUGMaaUVT_pdTizcuXw4rvDrE4,28577
89
+ megadetector/data_management/importers/carrizo_shrubfree_2018.py,sha256=ah14pfzLuDUph--qUqRqvWszOFY245rsIfAgCEF7F_I,7858
90
+ megadetector/data_management/importers/carrizo_trail_cam_2017.py,sha256=gwpL0sM82A6UBn2qWilP15D-1lOzQchZuhxXMzZ_7Ws,8862
91
+ megadetector/data_management/importers/cct_field_adjustments.py,sha256=wQmcntZNpHYRGjZvOcXqPxhAGdn1pDZa1pAXgTAyKmI,1348
92
+ megadetector/data_management/importers/channel_islands_to_cct.py,sha256=yEhfdgrY7omQnhjn-q17C96uilNTI5M2EqYBFKEVxJU,29488
93
+ megadetector/data_management/importers/ena24_to_json.py,sha256=7lv3Oe7mS4G1JEzagf8Pa4FMTqIu4ZGmn2AVykpJGXA,8270
94
+ megadetector/data_management/importers/filenames_to_json.py,sha256=Jc_FydTiZWsB6WZp0UdVsmtAMTDNy8SHuEKaUI2glnM,10521
95
+ megadetector/data_management/importers/helena_to_cct.py,sha256=IVTXXxDDxtbvYZaABCmnYWi2ZJ_1xpAXQG1TjOhRuVE,8712
96
+ megadetector/data_management/importers/idaho-camera-traps.py,sha256=9BpMwygyN8OLimGsHIodNrikVgSK9SGkZJ0c10GxT-0,54112
97
+ megadetector/data_management/importers/idfg_iwildcam_lila_prep.py,sha256=ql0fnO-IZuyT4611n8oYlTMDibhiDLDES1za1o6BEck,8194
98
+ megadetector/data_management/importers/jb_csv_to_json.py,sha256=IPoXwdz2OhrjMyK1Yv98PVmAD4VBZ9prSuXhx1xLfcg,3726
99
+ megadetector/data_management/importers/mcgill_to_json.py,sha256=dfSxU1hHimyGT6Zt64XFrW63GWGsdKpqRrp5PE--xUw,6702
100
+ megadetector/data_management/importers/missouri_to_json.py,sha256=C0ia3eCEZujVUKE2gmQc6ScsK8kXWM7m0ibeKgHfXNo,14848
101
+ megadetector/data_management/importers/nacti_fieldname_adjustments.py,sha256=1oDCSuFXhc2b7JPIzkSb3DkusacdAjMM2GQZnhfFQCg,2027
102
+ megadetector/data_management/importers/noaa_seals_2019.py,sha256=oar378j46fm27ygcbjrgN1rbq6h1SC8utAdSPNqiQt4,5152
103
+ megadetector/data_management/importers/pc_to_json.py,sha256=VmVvY5Fr8jMLmRkDZI9CuyLvrNuLrspJA9Q8Auxbw1A,10762
104
+ megadetector/data_management/importers/plot_wni_giraffes.py,sha256=KdEjbItDOXbXj0fr0celfMp7z31Rr3S29SLWBCMY-4M,3772
105
+ megadetector/data_management/importers/prepare-noaa-fish-data-for-lila.py,sha256=Pq5tSKWTIGEAGxBiGaO5Tz0QvKZ6QgJTIQ3raDAhjkk,12435
106
+ megadetector/data_management/importers/prepare_zsl_imerit.py,sha256=ohrUaTXIGg1M4_liptWaPa-4g3yNvc1E4o_knfHSE-8,3775
107
+ megadetector/data_management/importers/rspb_to_json.py,sha256=y03v1d1un9mI3HZRCZinMB1pEkNvTb70S7Qkr3F76qg,9841
108
+ megadetector/data_management/importers/save_the_elephants_survey_A.py,sha256=lugw8m5Nh2Fhs-FYo9L0mDL3_29nAweLxEul6GekdkI,10669
109
+ megadetector/data_management/importers/save_the_elephants_survey_B.py,sha256=SWClXENsIePwifP8eJeRsj3kh3Bztl6Kzc_BdqNZvFw,11172
110
+ megadetector/data_management/importers/snapshot_safari_importer.py,sha256=dQ1GmpHcrQCQF9YZ0UaLTvc_3aOZEDqWGcxzYQeq4ho,23605
111
+ megadetector/data_management/importers/snapshot_safari_importer_reprise.py,sha256=cv2zOWmhvXPRM-ZFrzmYFjq0Y2fwo7PUN_UJ_T2aryo,22333
112
+ megadetector/data_management/importers/snapshot_serengeti_lila.py,sha256=-aYq_5IxhpcR6oxFYYVv98WVnGAr0mnVkbX-oJCPd8M,33865
113
+ megadetector/data_management/importers/sulross_get_exif.py,sha256=Bt1tGYtr5CllxCe2BL8uI3SfPu3e1SSqijnOz--iRqQ,2071
114
+ megadetector/data_management/importers/timelapse_csv_set_to_json.py,sha256=B9VbBltf3IdPBI2O1Cmg8wODhlIML4MQpjdhTFD4GP4,15916
115
+ megadetector/data_management/importers/ubc_to_json.py,sha256=UhZ2P6WlLioLEPkfo7N7f168GErz7hQld00SSqOQ_Zg,14881
116
+ megadetector/data_management/importers/umn_to_json.py,sha256=wCVgvz1x7gL67s1Avyx0NwBvwSjhNMcAwOnDHR0O5G0,16185
117
+ megadetector/data_management/importers/wellington_to_json.py,sha256=TQivUZSgD-PeudGRAsgmsYznxDVaOPbbV4V9scnmZFg,7688
118
+ megadetector/data_management/importers/wi_to_json.py,sha256=tdscGc8SQdRbtjsUVQyCBcxR7_TjPNb_A6OLLUhOe9I,13663
119
+ megadetector/data_management/importers/zamba_results_to_md_results.py,sha256=L0E_zwPyN8Lvn1ukOw95TQ-APM7fBki_2_eKJhC3HkE,5381
120
+ megadetector/data_management/importers/eMammal/copy_and_unzip_emammal.py,sha256=CoP8rZOuLDIIL5jajB4WLnMhum19Ol-UT4W25FiF3zE,6085
121
+ megadetector/data_management/importers/eMammal/eMammal_helpers.py,sha256=Sv6PBAMDdlgwiek6Q3R6Rjio2RjtA-JpfgBr_Fmr9kA,6838
122
+ megadetector/data_management/importers/eMammal/make_eMammal_json.py,sha256=6C_-6Qk-Xhz_87DEPHA-txw90AvXrybJy1PbQXQbqwo,6987
123
+ megadetector/data_management/importers/snapshotserengeti/make_full_SS_json.py,sha256=khE3W0pO3Uq-UCfrLW_rpzWqjLll2JoBc360XeAuUGc,4126
124
+ megadetector/data_management/importers/snapshotserengeti/make_per_season_SS_json.py,sha256=sAwvcR2siwblgY3LfTsbH4mXOXvJZCA246QIsQWuQBA,4316
125
+ megadetector/data_management/lila/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
126
+ megadetector/data_management/lila/add_locations_to_island_camera_traps.py,sha256=OQ-wn2YX0V96aw1EJxUAMYRnkv9G-dvHBU8ULQF-Tus,2583
127
+ megadetector/data_management/lila/add_locations_to_nacti.py,sha256=S4ty7lARf2O13_GWTX1pFYyixPCNecqUj6jpO3hOV2w,4849
128
+ megadetector/data_management/lila/create_lila_blank_set.py,sha256=SBwpM0-pycW37TESXaJlc2oo_qIxYJoOzHhmmnBHWWI,19826
129
+ megadetector/data_management/lila/create_lila_test_set.py,sha256=DjivKgsFJlO1IHezXrwAGpiCAhLVmvPnv2nJYpv1ABU,4835
130
+ megadetector/data_management/lila/create_links_to_md_results_files.py,sha256=MvaPBAgdwoxaNrRaKZ8mGaOCky1BYXlrT08tPG9BrpM,3803
131
+ megadetector/data_management/lila/download_lila_subset.py,sha256=rh09kphSCVPlUGuYY-CkSyd8dy0pBUdth6uHkZ84sEo,5345
132
+ megadetector/data_management/lila/generate_lila_per_image_labels.py,sha256=awfBLjVgwP39a2nySMZSAzcoAMHcblzYGlQVt2jP45E,18075
133
+ megadetector/data_management/lila/get_lila_annotation_counts.py,sha256=aOkjemasOqf1Uixu-yhaFKYyKILYRZQZi4GBW4sbtic,5602
134
+ megadetector/data_management/lila/get_lila_image_counts.py,sha256=UxXS5RDnSA_WbxE92qN-N7p-qR-jbyTsTZ7duLo06us,3620
135
+ megadetector/data_management/lila/lila_common.py,sha256=IEnGoyRgcqbek1qJ1gFE83p1Pg_5kaMS-nQI25lRWIs,10132
136
+ megadetector/data_management/lila/test_lila_metadata_urls.py,sha256=2zKNjgqC3kxdFfyvQC3KTlpc9lf2iMzecHQBf--r_Tk,4438
137
+ megadetector/detection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
138
+ megadetector/detection/process_video.py,sha256=5uyJdARkEHfpeL8ASE3XS72WjNGkMqj6GH63joWxMSs,35622
139
+ megadetector/detection/pytorch_detector.py,sha256=gLhCTvBYa1X54cobxle-G9L5MlHDk0UUn353TEtmu4M,13557
140
+ megadetector/detection/run_detector.py,sha256=CxwCqE-T5ioQ1kb5Tn4HvzBMK0gvJwaAOl8HfDTWiVY,29745
141
+ megadetector/detection/run_detector_batch.py,sha256=MQ8cEVg92aTmysapPuj3JAr92HfnuopCHbDGoMZA7ko,52132
142
+ megadetector/detection/run_inference_with_yolov5_val.py,sha256=u9i1ndwl_k0DsiAWYQcYrrrB9D9Wt56_k6iGTAetUaM,46786
143
+ megadetector/detection/run_tiled_inference.py,sha256=vw0713eNuMiEOjHfweQl58zPHNxPOMdFWZ8bTDLhlMY,37883
144
+ megadetector/detection/tf_detector.py,sha256=-Yr42X06HwGvYDflYbdBI8dND5ahBCzu-xXSfdWd6ag,7651
145
+ megadetector/detection/video_utils.py,sha256=4dQGEVk7rJ7bOrCHobrAMVwb-xE-Nu0cYptxLxPSW7w,27245
146
+ megadetector/detection/detector_training/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
147
+ megadetector/detection/detector_training/model_main_tf2.py,sha256=YwNsZ7hkIFaEuwKU0rHG_VyqiR_0E01BbdlD0Yx4Smo,4936
148
+ megadetector/postprocessing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
149
+ megadetector/postprocessing/add_max_conf.py,sha256=qTE1_0RwGAy6jLDkHrIo2pS84yNbUV11s4IZuAYGdIU,1514
150
+ megadetector/postprocessing/categorize_detections_by_size.py,sha256=YdapcvjA6Dz2dPa2AFf1Dwyl7C-OmmP4G4OjhTOuaF4,5797
151
+ megadetector/postprocessing/classification_postprocessing.py,sha256=8uvlA0Gc8nakM5IE5Pud7WZfmF5kEhcYvxgQXcI9kl0,30429
152
+ megadetector/postprocessing/combine_api_outputs.py,sha256=xCJHEKca8YW-mupEr0yNNwwSBeL9NvcV1w3VtEzN4lk,8535
153
+ megadetector/postprocessing/compare_batch_results.py,sha256=7O5c6-JsIDpuIGobks_R9j8MPuiZQRnEtNnJQsJqICM,38918
154
+ megadetector/postprocessing/convert_output_format.py,sha256=IGCWoIJ1Z9RUI9yqpbL3t5KThDiElM3czmiTyXty72c,15002
155
+ megadetector/postprocessing/load_api_results.py,sha256=FqcaiPMuqTojZOV3Jn14pJESpuwjWGbZtcvJuVXUaDM,6861
156
+ megadetector/postprocessing/md_to_coco.py,sha256=t8zHN3QmwxuvcQKxLd_yMSjwncxy7YEoq2EGr0kwBDs,11049
157
+ megadetector/postprocessing/md_to_labelme.py,sha256=hejMKVxaz_xdtsGDPTQkeWuis7gzT-VOrL2Qf8ym1x0,11703
158
+ megadetector/postprocessing/merge_detections.py,sha256=AEMgMivhph1vph_t_Qv85d9iHynT2nvq7otN4KGrDLU,17776
159
+ megadetector/postprocessing/postprocess_batch_results.py,sha256=ucFW2WsuoxIgEC62CrgOLCOTO3LxIZ-LPCYRJ9xjais,78178
160
+ megadetector/postprocessing/remap_detection_categories.py,sha256=d9IYTa0i_KbbrarJc_mczABmdwypscl5-KpK8Hx_z8o,6640
161
+ megadetector/postprocessing/render_detection_confusion_matrix.py,sha256=_wsk4W0PbNiqmFuHy-EA0Z07B1tQLMsdCTPatnHAdZw,27382
162
+ megadetector/postprocessing/separate_detections_into_folders.py,sha256=k42gxnL8hbBiV0e2T-jmFrhxzIxnhi57Nx9cDSSL5s0,31218
163
+ megadetector/postprocessing/subset_json_detector_output.py,sha256=TIXIWEv0nh4cXvhMLcM_ZryM5ly1NOTkWopM2RjEpqQ,26822
164
+ megadetector/postprocessing/top_folders_to_bottom.py,sha256=Dqk-KZXiRlIYlmLZmk6aUapmaaLJUKOf8wK1kxt9W6A,6283
165
+ megadetector/postprocessing/repeat_detection_elimination/find_repeat_detections.py,sha256=e4Y9CyMyd-bLN3il8tu76vI0nVYHZlhZr6vcL0J4zQ0,9832
166
+ megadetector/postprocessing/repeat_detection_elimination/remove_repeat_detections.py,sha256=tARPxuY0OyQgpKU2XqiQPko3f-hHnWuISB8ZlZgXwxI,2819
167
+ megadetector/postprocessing/repeat_detection_elimination/repeat_detections_core.py,sha256=_RX0Gtb8YQPYdfQDGIvg1RvyqsdyanmEg1pqVmheHlg,67776
168
+ megadetector/taxonomy_mapping/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
169
+ megadetector/taxonomy_mapping/map_lila_taxonomy_to_wi_taxonomy.py,sha256=6D_YHTeWTs6O8S9ABog2t9-wfQSh9dW2k9XTqXUZKfo,17927
170
+ megadetector/taxonomy_mapping/map_new_lila_datasets.py,sha256=M-hRnQuqh5QhW-7LmTvYRex1Y2izQFSgEzb92gqqx1M,4062
171
+ megadetector/taxonomy_mapping/prepare_lila_taxonomy_release.py,sha256=N9TUgg3_2u4hc5OBRydvEpweC3RIJ9ry5bXoi1BXLAY,4676
172
+ megadetector/taxonomy_mapping/preview_lila_taxonomy.py,sha256=3e-e3rurissksHgRCrc-_oLJSy2KCxcvwtAQM7L2E1U,19549
173
+ megadetector/taxonomy_mapping/retrieve_sample_image.py,sha256=4cfWsLRwS_EwAmQr2p5tA_W6glBK71tSjPfaHxUZQWs,1979
174
+ megadetector/taxonomy_mapping/simple_image_download.py,sha256=_1dEGn4356mdQAy9yzkH5DntPO7-nQyYo2zm08ODpJc,6852
175
+ megadetector/taxonomy_mapping/species_lookup.py,sha256=B5arfF1OVICtTokVOtJcN8W2SxGmq46AO0SfA11Upt8,28291
176
+ megadetector/taxonomy_mapping/taxonomy_csv_checker.py,sha256=A_zPwzY-ERz6xawxgk2Tpfsycl-1sDcjUiuaXXBppi8,4850
177
+ megadetector/taxonomy_mapping/taxonomy_graph.py,sha256=ayrTFseVaIMbtMXhnjWCkZdxI5SAVe_BUtnanGewQpU,12263
178
+ megadetector/taxonomy_mapping/validate_lila_category_mappings.py,sha256=1qyZr23bvZSVUYLQnO1XAtIZ4jdpARA5dxt8euKVyOA,2527
179
+ megadetector/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
180
+ megadetector/utils/azure_utils.py,sha256=0BdnkG2hW-X0yFpsJqmBhOd2wysz_LvhuyImPJMVPJs,6271
181
+ megadetector/utils/ct_utils.py,sha256=RTMc0UszYuW9QpMo-qetaWder1mFWIzkMLL2UM6PYdY,17960
182
+ megadetector/utils/directory_listing.py,sha256=r4rg2xA4O9ZVxVtzPZzXIXa0DOEukAJMTTNcNSiQcuM,9668
183
+ megadetector/utils/md_tests.py,sha256=sD6HW_E5hqNcj-rjDVKlcwzBOT8W0WAY9khG3ofpvQE,44322
184
+ megadetector/utils/path_utils.py,sha256=E57sjmSzZ5FWd5aQvLiP7VvjVoyKa1S5yL0Oz-CdxRs,36049
185
+ megadetector/utils/process_utils.py,sha256=pSReAq30XGit_uTy5a-YeQ9_DlYIGMreQZ_kRAcvnJc,5330
186
+ megadetector/utils/sas_blob_utils.py,sha256=k76EcMmJc_otrEHcfV2fxAC6fNhxU88FxM3ddSYrsKU,16917
187
+ megadetector/utils/split_locations_into_train_val.py,sha256=jvaDu1xKB51L3Xq2nXQo0XtXRjNRf8RglBApl1g6gHo,10101
188
+ megadetector/utils/string_utils.py,sha256=ZQapJodzvTDyQhjZgMoMl3-9bqnKAUlORpws8Db9AkA,2050
189
+ megadetector/utils/url_utils.py,sha256=uJRsSMxA1zMd997dX3V3wqFnKMTcSiOaE_atXUTRRVI,11476
190
+ megadetector/utils/write_html_image_list.py,sha256=apzoWkgZWG-ybCT4k92PlS4-guN_sNBSMMMbj7Cfm1k,8638
191
+ megadetector/visualization/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
192
+ megadetector/visualization/plot_utils.py,sha256=lOfU3uPrcuHZagV_1SN8erT8PujIepocgw6KZ17Ej6c,10671
193
+ megadetector/visualization/render_images_with_thumbnails.py,sha256=kgJYW8BsqRO4C7T3sqItdBuSkZ64I1vOtIWAsVG4XBI,10589
194
+ megadetector/visualization/visualization_utils.py,sha256=BIb1uCDD6TlHLDM_2uA-4lzcVcdiFLeKu8kuY2fct6g,62150
195
+ megadetector/visualization/visualize_db.py,sha256=3FhOtn3GHvNsomwSpsSEzYe58lF9B4Ob3MEi_xplrdo,21256
196
+ megadetector/visualization/visualize_detector_output.py,sha256=dFpQdLnbULO8wPGeN2z0muYNtHglUDsH-LeqdbYa6DY,17096
197
+ megadetector-5.0.13.dist-info/LICENSE,sha256=RMa3qq-7Cyk7DdtqRj_bP1oInGFgjyHn9-PZ3PcrqIs,1100
198
+ megadetector-5.0.13.dist-info/METADATA,sha256=F1YjjxKHnVp17PDYDGPDmFfntKjltACiD7dg8Kq1584,7893
199
+ megadetector-5.0.13.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
200
+ megadetector-5.0.13.dist-info/top_level.txt,sha256=wf9DXa8EwiOSZ4G5IPjakSxBPxTDjhYYnqWRfR-zS4M,13
201
+ megadetector-5.0.13.dist-info/RECORD,,
@@ -0,0 +1 @@
1
+ megadetector
@@ -1,5 +0,0 @@
1
- megadetector-5.0.11.dist-info/LICENSE,sha256=RMa3qq-7Cyk7DdtqRj_bP1oInGFgjyHn9-PZ3PcrqIs,1100
2
- megadetector-5.0.11.dist-info/METADATA,sha256=75C8pju-LB8QrMl4VEPOa-6y5q0_vlLN83xlYdd8IB8,7892
3
- megadetector-5.0.11.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
4
- megadetector-5.0.11.dist-info/top_level.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
5
- megadetector-5.0.11.dist-info/RECORD,,
@@ -1 +0,0 @@
1
-