megadetector 5.0.11__py3-none-any.whl → 5.0.12__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 (201) 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 +98 -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 +152 -0
  11. megadetector/api/batch_processing/api_core/server_orchestration.py +360 -0
  12. megadetector/api/batch_processing/api_core/server_utils.py +92 -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 +126 -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 +266 -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 +610 -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 +239 -0
  58. megadetector/data_management/cct_json_utils.py +395 -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 +272 -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 +477 -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 +796 -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 +874 -0
  129. megadetector/data_management/read_exif.py +681 -0
  130. megadetector/data_management/remap_coco_categories.py +84 -0
  131. megadetector/data_management/remove_exif.py +66 -0
  132. megadetector/data_management/resize_coco_dataset.py +189 -0
  133. megadetector/data_management/wi_download_csv_to_coco.py +246 -0
  134. megadetector/data_management/yolo_output_to_md_output.py +441 -0
  135. megadetector/data_management/yolo_to_coco.py +676 -0
  136. megadetector/detection/__init__.py +0 -0
  137. megadetector/detection/detector_training/__init__.py +0 -0
  138. megadetector/detection/detector_training/model_main_tf2.py +114 -0
  139. megadetector/detection/process_video.py +702 -0
  140. megadetector/detection/pytorch_detector.py +341 -0
  141. megadetector/detection/run_detector.py +779 -0
  142. megadetector/detection/run_detector_batch.py +1219 -0
  143. megadetector/detection/run_inference_with_yolov5_val.py +917 -0
  144. megadetector/detection/run_tiled_inference.py +934 -0
  145. megadetector/detection/tf_detector.py +189 -0
  146. megadetector/detection/video_utils.py +606 -0
  147. megadetector/postprocessing/__init__.py +0 -0
  148. megadetector/postprocessing/add_max_conf.py +64 -0
  149. megadetector/postprocessing/categorize_detections_by_size.py +163 -0
  150. megadetector/postprocessing/combine_api_outputs.py +249 -0
  151. megadetector/postprocessing/compare_batch_results.py +958 -0
  152. megadetector/postprocessing/convert_output_format.py +396 -0
  153. megadetector/postprocessing/load_api_results.py +195 -0
  154. megadetector/postprocessing/md_to_coco.py +310 -0
  155. megadetector/postprocessing/md_to_labelme.py +330 -0
  156. megadetector/postprocessing/merge_detections.py +401 -0
  157. megadetector/postprocessing/postprocess_batch_results.py +1902 -0
  158. megadetector/postprocessing/remap_detection_categories.py +170 -0
  159. megadetector/postprocessing/render_detection_confusion_matrix.py +660 -0
  160. megadetector/postprocessing/repeat_detection_elimination/find_repeat_detections.py +211 -0
  161. megadetector/postprocessing/repeat_detection_elimination/remove_repeat_detections.py +83 -0
  162. megadetector/postprocessing/repeat_detection_elimination/repeat_detections_core.py +1631 -0
  163. megadetector/postprocessing/separate_detections_into_folders.py +730 -0
  164. megadetector/postprocessing/subset_json_detector_output.py +696 -0
  165. megadetector/postprocessing/top_folders_to_bottom.py +223 -0
  166. megadetector/taxonomy_mapping/__init__.py +0 -0
  167. megadetector/taxonomy_mapping/map_lila_taxonomy_to_wi_taxonomy.py +491 -0
  168. megadetector/taxonomy_mapping/map_new_lila_datasets.py +150 -0
  169. megadetector/taxonomy_mapping/prepare_lila_taxonomy_release.py +142 -0
  170. megadetector/taxonomy_mapping/preview_lila_taxonomy.py +590 -0
  171. megadetector/taxonomy_mapping/retrieve_sample_image.py +71 -0
  172. megadetector/taxonomy_mapping/simple_image_download.py +219 -0
  173. megadetector/taxonomy_mapping/species_lookup.py +834 -0
  174. megadetector/taxonomy_mapping/taxonomy_csv_checker.py +159 -0
  175. megadetector/taxonomy_mapping/taxonomy_graph.py +346 -0
  176. megadetector/taxonomy_mapping/validate_lila_category_mappings.py +83 -0
  177. megadetector/utils/__init__.py +0 -0
  178. megadetector/utils/azure_utils.py +178 -0
  179. megadetector/utils/ct_utils.py +612 -0
  180. megadetector/utils/directory_listing.py +246 -0
  181. megadetector/utils/md_tests.py +968 -0
  182. megadetector/utils/path_utils.py +1044 -0
  183. megadetector/utils/process_utils.py +157 -0
  184. megadetector/utils/sas_blob_utils.py +509 -0
  185. megadetector/utils/split_locations_into_train_val.py +228 -0
  186. megadetector/utils/string_utils.py +92 -0
  187. megadetector/utils/url_utils.py +323 -0
  188. megadetector/utils/write_html_image_list.py +225 -0
  189. megadetector/visualization/__init__.py +0 -0
  190. megadetector/visualization/plot_utils.py +293 -0
  191. megadetector/visualization/render_images_with_thumbnails.py +275 -0
  192. megadetector/visualization/visualization_utils.py +1536 -0
  193. megadetector/visualization/visualize_db.py +550 -0
  194. megadetector/visualization/visualize_detector_output.py +405 -0
  195. {megadetector-5.0.11.dist-info → megadetector-5.0.12.dist-info}/METADATA +1 -1
  196. megadetector-5.0.12.dist-info/RECORD +199 -0
  197. megadetector-5.0.12.dist-info/top_level.txt +1 -0
  198. megadetector-5.0.11.dist-info/RECORD +0 -5
  199. megadetector-5.0.11.dist-info/top_level.txt +0 -1
  200. {megadetector-5.0.11.dist-info → megadetector-5.0.12.dist-info}/LICENSE +0 -0
  201. {megadetector-5.0.11.dist-info → megadetector-5.0.12.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.12
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>
@@ -0,0 +1,199 @@
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=BNqM5EK29B0haCW7rdeOzVqcCJDziZiD0Etc1mPs56c,11668
5
+ megadetector/api/batch_processing/api_core/server_api_config.py,sha256=G8X5wgqEXPrWWQpgDI9ua-JktiUgy9mOpEltXSIazLQ,3318
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=3fJrdyeoVLGbbbdKy7cAVL_ZHbCmCQ2o5D26jBBQRJo,6239
9
+ megadetector/api/batch_processing/api_core/server_orchestration.py,sha256=LYHABzhOvP0NrM1VIjI6Vwb95YZ5xjQ52mUJW8oIOQ0,17003
10
+ megadetector/api/batch_processing/api_core/server_utils.py,sha256=oFusP1E29op5DN1nEaR-jQZgRExqMDdzmRL6BHj8EDk,3314
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=_mfKTNfLtQKaOK5YuG5mTm_Q_24_0K4wR3eLzJwXVPs,3607
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=aV522pnD__xtk902JHULOrLrq0lVM7JTC5AUKNPmtBk,10417
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=TF5S2cn2lvlCO2dFhdFPdzjbBBs-SyZGZmEx_dsJMbo,24846
54
+ megadetector/data_management/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
+ megadetector/data_management/camtrap_dp_to_coco.py,sha256=DLiGrSdndiEIUi1lF-kc-HsQVt3ouCWOQ3sthDw-Ais,8635
56
+ megadetector/data_management/cct_json_utils.py,sha256=eCyypfQ1K21IoPDp3aYumm9WyiprNoqZAlMN8AVVKls,14795
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=7HIk8N3gkGz85hffTYvzoPMw_XaCbAjvyruoMoxiFU8,8314
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=sdOu1hCnQrohtoKDhSdMcmQPKrTp9EpbFRfXx0Bph74,32562
66
+ megadetector/data_management/read_exif.py,sha256=bMMzZYP8p5Ey1MglJo3fz2NeSV1l90GiTWQGxalKfNw,22765
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/resize_coco_dataset.py,sha256=AaiV7efIcNnqsXsnQckmHq2G__7ZQHBV_jN6rhZfMjo,6810
70
+ megadetector/data_management/wi_download_csv_to_coco.py,sha256=8UJRlu1JAhKcIl-wydq54k037htCMrXBZVDHDYMZm8A,8340
71
+ megadetector/data_management/yolo_output_to_md_output.py,sha256=cxIeEcqhPOdLGYnNcT-yYnFg-yXD5wIcYJX5TGNWeEg,17305
72
+ megadetector/data_management/yolo_to_coco.py,sha256=G9XiB9D8PWaCq_kc61pKe2GkkuKwdJ7K7zsbGShb_jw,25176
73
+ megadetector/data_management/annotations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
74
+ megadetector/data_management/annotations/annotation_constants.py,sha256=1597MpAr_HdidIHoDFj4RgUO3K5e2Xm2bGafGeonR2k,953
75
+ megadetector/data_management/databases/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
76
+ megadetector/data_management/databases/add_width_and_height_to_db.py,sha256=X7A_iniGwlkhZ0jUNm564GT_mH2_RJGLD0aGP9cBhY0,749
77
+ megadetector/data_management/databases/combine_coco_camera_traps_files.py,sha256=oeELrMgxhsJ6aNBxPQyu4CmsdtYnzS5GKZEV8U-XUdk,6693
78
+ megadetector/data_management/databases/integrity_check_json_db.py,sha256=RNUz6A24UwBzRIbolzXIPic3Q5LFaaCHcAJP1arap2I,16305
79
+ megadetector/data_management/databases/subset_json_db.py,sha256=JK71qSUpUZe7cJquyt2xEzirDoZq1Lrr2X0cgtHKBpA,3219
80
+ megadetector/data_management/importers/add_nacti_sizes.py,sha256=jjGTpd36g5w7nLIeOatXRwu1Uti2GiGgP3-61QSg8oA,1156
81
+ megadetector/data_management/importers/add_timestamps_to_icct.py,sha256=5l1TkWq3X4Mxed7zlZ07U1RQcjbzBnwcoftNiaruigM,2364
82
+ megadetector/data_management/importers/animl_results_to_md_results.py,sha256=duvQkfFzONYHdTsJrhHyufpamK55r41IjkjFuPY7WmE,4698
83
+ megadetector/data_management/importers/auckland_doc_test_to_json.py,sha256=tT4XnvY3c5idDkQByfN6Z646CNiCprS-75ytjbMbnVY,12911
84
+ megadetector/data_management/importers/auckland_doc_to_json.py,sha256=EoNsAJvzTwcgHspE05eO0LHazMVYM7-yzFBit0FiJWk,5970
85
+ megadetector/data_management/importers/awc_to_json.py,sha256=e1HjShGS2WC-l99FV89g1u0o2v5990Vh9XsjIukg6qQ,5327
86
+ megadetector/data_management/importers/bellevue_to_json.py,sha256=oJMSF0r_snRXtppiwFy4vvP8gErEw6_7Kv1UJs59QLo,7919
87
+ megadetector/data_management/importers/cacophony-thermal-importer.py,sha256=YauLjRDwMaML3MpVJvon308bcO14r956iClKNwDsIDs,28640
88
+ megadetector/data_management/importers/carrizo_shrubfree_2018.py,sha256=ah14pfzLuDUph--qUqRqvWszOFY245rsIfAgCEF7F_I,7858
89
+ megadetector/data_management/importers/carrizo_trail_cam_2017.py,sha256=gwpL0sM82A6UBn2qWilP15D-1lOzQchZuhxXMzZ_7Ws,8862
90
+ megadetector/data_management/importers/cct_field_adjustments.py,sha256=wQmcntZNpHYRGjZvOcXqPxhAGdn1pDZa1pAXgTAyKmI,1348
91
+ megadetector/data_management/importers/channel_islands_to_cct.py,sha256=yEhfdgrY7omQnhjn-q17C96uilNTI5M2EqYBFKEVxJU,29488
92
+ megadetector/data_management/importers/ena24_to_json.py,sha256=7lv3Oe7mS4G1JEzagf8Pa4FMTqIu4ZGmn2AVykpJGXA,8270
93
+ megadetector/data_management/importers/filenames_to_json.py,sha256=Jc_FydTiZWsB6WZp0UdVsmtAMTDNy8SHuEKaUI2glnM,10521
94
+ megadetector/data_management/importers/helena_to_cct.py,sha256=IVTXXxDDxtbvYZaABCmnYWi2ZJ_1xpAXQG1TjOhRuVE,8712
95
+ megadetector/data_management/importers/idaho-camera-traps.py,sha256=9BpMwygyN8OLimGsHIodNrikVgSK9SGkZJ0c10GxT-0,54112
96
+ megadetector/data_management/importers/idfg_iwildcam_lila_prep.py,sha256=ql0fnO-IZuyT4611n8oYlTMDibhiDLDES1za1o6BEck,8194
97
+ megadetector/data_management/importers/jb_csv_to_json.py,sha256=IPoXwdz2OhrjMyK1Yv98PVmAD4VBZ9prSuXhx1xLfcg,3726
98
+ megadetector/data_management/importers/mcgill_to_json.py,sha256=dfSxU1hHimyGT6Zt64XFrW63GWGsdKpqRrp5PE--xUw,6702
99
+ megadetector/data_management/importers/missouri_to_json.py,sha256=C0ia3eCEZujVUKE2gmQc6ScsK8kXWM7m0ibeKgHfXNo,14848
100
+ megadetector/data_management/importers/nacti_fieldname_adjustments.py,sha256=1oDCSuFXhc2b7JPIzkSb3DkusacdAjMM2GQZnhfFQCg,2027
101
+ megadetector/data_management/importers/noaa_seals_2019.py,sha256=oar378j46fm27ygcbjrgN1rbq6h1SC8utAdSPNqiQt4,5152
102
+ megadetector/data_management/importers/pc_to_json.py,sha256=VmVvY5Fr8jMLmRkDZI9CuyLvrNuLrspJA9Q8Auxbw1A,10762
103
+ megadetector/data_management/importers/plot_wni_giraffes.py,sha256=KdEjbItDOXbXj0fr0celfMp7z31Rr3S29SLWBCMY-4M,3772
104
+ megadetector/data_management/importers/prepare-noaa-fish-data-for-lila.py,sha256=Pq5tSKWTIGEAGxBiGaO5Tz0QvKZ6QgJTIQ3raDAhjkk,12435
105
+ megadetector/data_management/importers/prepare_zsl_imerit.py,sha256=ohrUaTXIGg1M4_liptWaPa-4g3yNvc1E4o_knfHSE-8,3775
106
+ megadetector/data_management/importers/rspb_to_json.py,sha256=y03v1d1un9mI3HZRCZinMB1pEkNvTb70S7Qkr3F76qg,9841
107
+ megadetector/data_management/importers/save_the_elephants_survey_A.py,sha256=lugw8m5Nh2Fhs-FYo9L0mDL3_29nAweLxEul6GekdkI,10669
108
+ megadetector/data_management/importers/save_the_elephants_survey_B.py,sha256=SWClXENsIePwifP8eJeRsj3kh3Bztl6Kzc_BdqNZvFw,11172
109
+ megadetector/data_management/importers/snapshot_safari_importer.py,sha256=dQ1GmpHcrQCQF9YZ0UaLTvc_3aOZEDqWGcxzYQeq4ho,23605
110
+ megadetector/data_management/importers/snapshot_safari_importer_reprise.py,sha256=cv2zOWmhvXPRM-ZFrzmYFjq0Y2fwo7PUN_UJ_T2aryo,22333
111
+ megadetector/data_management/importers/snapshot_serengeti_lila.py,sha256=-aYq_5IxhpcR6oxFYYVv98WVnGAr0mnVkbX-oJCPd8M,33865
112
+ megadetector/data_management/importers/sulross_get_exif.py,sha256=Bt1tGYtr5CllxCe2BL8uI3SfPu3e1SSqijnOz--iRqQ,2071
113
+ megadetector/data_management/importers/timelapse_csv_set_to_json.py,sha256=B9VbBltf3IdPBI2O1Cmg8wODhlIML4MQpjdhTFD4GP4,15916
114
+ megadetector/data_management/importers/ubc_to_json.py,sha256=UhZ2P6WlLioLEPkfo7N7f168GErz7hQld00SSqOQ_Zg,14881
115
+ megadetector/data_management/importers/umn_to_json.py,sha256=wCVgvz1x7gL67s1Avyx0NwBvwSjhNMcAwOnDHR0O5G0,16185
116
+ megadetector/data_management/importers/wellington_to_json.py,sha256=TQivUZSgD-PeudGRAsgmsYznxDVaOPbbV4V9scnmZFg,7688
117
+ megadetector/data_management/importers/wi_to_json.py,sha256=tdscGc8SQdRbtjsUVQyCBcxR7_TjPNb_A6OLLUhOe9I,13663
118
+ megadetector/data_management/importers/zamba_results_to_md_results.py,sha256=L0E_zwPyN8Lvn1ukOw95TQ-APM7fBki_2_eKJhC3HkE,5381
119
+ megadetector/data_management/importers/eMammal/copy_and_unzip_emammal.py,sha256=CoP8rZOuLDIIL5jajB4WLnMhum19Ol-UT4W25FiF3zE,6085
120
+ megadetector/data_management/importers/eMammal/eMammal_helpers.py,sha256=Sv6PBAMDdlgwiek6Q3R6Rjio2RjtA-JpfgBr_Fmr9kA,6838
121
+ megadetector/data_management/importers/eMammal/make_eMammal_json.py,sha256=6C_-6Qk-Xhz_87DEPHA-txw90AvXrybJy1PbQXQbqwo,6987
122
+ megadetector/data_management/importers/snapshotserengeti/make_full_SS_json.py,sha256=khE3W0pO3Uq-UCfrLW_rpzWqjLll2JoBc360XeAuUGc,4126
123
+ megadetector/data_management/importers/snapshotserengeti/make_per_season_SS_json.py,sha256=sAwvcR2siwblgY3LfTsbH4mXOXvJZCA246QIsQWuQBA,4316
124
+ megadetector/data_management/lila/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
125
+ megadetector/data_management/lila/add_locations_to_island_camera_traps.py,sha256=OQ-wn2YX0V96aw1EJxUAMYRnkv9G-dvHBU8ULQF-Tus,2583
126
+ megadetector/data_management/lila/add_locations_to_nacti.py,sha256=S4ty7lARf2O13_GWTX1pFYyixPCNecqUj6jpO3hOV2w,4849
127
+ megadetector/data_management/lila/create_lila_blank_set.py,sha256=SBwpM0-pycW37TESXaJlc2oo_qIxYJoOzHhmmnBHWWI,19826
128
+ megadetector/data_management/lila/create_lila_test_set.py,sha256=DjivKgsFJlO1IHezXrwAGpiCAhLVmvPnv2nJYpv1ABU,4835
129
+ megadetector/data_management/lila/create_links_to_md_results_files.py,sha256=MvaPBAgdwoxaNrRaKZ8mGaOCky1BYXlrT08tPG9BrpM,3803
130
+ megadetector/data_management/lila/download_lila_subset.py,sha256=rh09kphSCVPlUGuYY-CkSyd8dy0pBUdth6uHkZ84sEo,5345
131
+ megadetector/data_management/lila/generate_lila_per_image_labels.py,sha256=awfBLjVgwP39a2nySMZSAzcoAMHcblzYGlQVt2jP45E,18075
132
+ megadetector/data_management/lila/get_lila_annotation_counts.py,sha256=aOkjemasOqf1Uixu-yhaFKYyKILYRZQZi4GBW4sbtic,5602
133
+ megadetector/data_management/lila/get_lila_image_counts.py,sha256=UxXS5RDnSA_WbxE92qN-N7p-qR-jbyTsTZ7duLo06us,3620
134
+ megadetector/data_management/lila/lila_common.py,sha256=IEnGoyRgcqbek1qJ1gFE83p1Pg_5kaMS-nQI25lRWIs,10132
135
+ megadetector/data_management/lila/test_lila_metadata_urls.py,sha256=2zKNjgqC3kxdFfyvQC3KTlpc9lf2iMzecHQBf--r_Tk,4438
136
+ megadetector/detection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
137
+ megadetector/detection/process_video.py,sha256=Fufvtmmuf6huWdwet1d035BJHq2Sq7muIgLNVGS8Y0Y,29912
138
+ megadetector/detection/pytorch_detector.py,sha256=-sI1Bm4acNLDi63RaiPpuEM8_RDwDQ2LWHBVTtkr2RM,12727
139
+ megadetector/detection/run_detector.py,sha256=CxwCqE-T5ioQ1kb5Tn4HvzBMK0gvJwaAOl8HfDTWiVY,29745
140
+ megadetector/detection/run_detector_batch.py,sha256=MQ8cEVg92aTmysapPuj3JAr92HfnuopCHbDGoMZA7ko,52132
141
+ megadetector/detection/run_inference_with_yolov5_val.py,sha256=e0LRZ8J1VI3G3eVL6_y19i2j77ZUsLl-mf3i7oLde7U,36946
142
+ megadetector/detection/run_tiled_inference.py,sha256=vw0713eNuMiEOjHfweQl58zPHNxPOMdFWZ8bTDLhlMY,37883
143
+ megadetector/detection/tf_detector.py,sha256=5tdGXgF7bkeDJaXe4U34HD5z97xVzDpmYWqNK2AVf1o,7562
144
+ megadetector/detection/video_utils.py,sha256=vdetbPCHKccJZNt4sREVcHil6WyMgU3QXNWe4mgSJLg,22773
145
+ megadetector/detection/detector_training/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
146
+ megadetector/detection/detector_training/model_main_tf2.py,sha256=YwNsZ7hkIFaEuwKU0rHG_VyqiR_0E01BbdlD0Yx4Smo,4936
147
+ megadetector/postprocessing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
148
+ megadetector/postprocessing/add_max_conf.py,sha256=qTE1_0RwGAy6jLDkHrIo2pS84yNbUV11s4IZuAYGdIU,1514
149
+ megadetector/postprocessing/categorize_detections_by_size.py,sha256=RFTQrVM8FhIcwevBFKOiBv2epY4GzWHf-kIXyhyAUX8,5688
150
+ megadetector/postprocessing/combine_api_outputs.py,sha256=xCJHEKca8YW-mupEr0yNNwwSBeL9NvcV1w3VtEzN4lk,8535
151
+ megadetector/postprocessing/compare_batch_results.py,sha256=qLEqVpqaGa6tbEfToEZNyATaqXMvgBc7bLwgykAGpz4,38261
152
+ megadetector/postprocessing/convert_output_format.py,sha256=IGCWoIJ1Z9RUI9yqpbL3t5KThDiElM3czmiTyXty72c,15002
153
+ megadetector/postprocessing/load_api_results.py,sha256=FqcaiPMuqTojZOV3Jn14pJESpuwjWGbZtcvJuVXUaDM,6861
154
+ megadetector/postprocessing/md_to_coco.py,sha256=t8zHN3QmwxuvcQKxLd_yMSjwncxy7YEoq2EGr0kwBDs,11049
155
+ megadetector/postprocessing/md_to_labelme.py,sha256=hejMKVxaz_xdtsGDPTQkeWuis7gzT-VOrL2Qf8ym1x0,11703
156
+ megadetector/postprocessing/merge_detections.py,sha256=cpAeyWJjC6_Mf0wv9Qxo_zxp_xfgmrMIfeEhCEBKVe4,17173
157
+ megadetector/postprocessing/postprocess_batch_results.py,sha256=fl3a7Mc4l0OgRA5BLT_GgaC9WuDcoyf3hNW9fXIZeI4,77376
158
+ megadetector/postprocessing/remap_detection_categories.py,sha256=d9IYTa0i_KbbrarJc_mczABmdwypscl5-KpK8Hx_z8o,6640
159
+ megadetector/postprocessing/render_detection_confusion_matrix.py,sha256=_wsk4W0PbNiqmFuHy-EA0Z07B1tQLMsdCTPatnHAdZw,27382
160
+ megadetector/postprocessing/separate_detections_into_folders.py,sha256=k42gxnL8hbBiV0e2T-jmFrhxzIxnhi57Nx9cDSSL5s0,31218
161
+ megadetector/postprocessing/subset_json_detector_output.py,sha256=64nEOilaB0_B8o-unh7PCjyUkfDPQDcl2QGOuzkw5OI,26424
162
+ megadetector/postprocessing/top_folders_to_bottom.py,sha256=Dqk-KZXiRlIYlmLZmk6aUapmaaLJUKOf8wK1kxt9W6A,6283
163
+ megadetector/postprocessing/repeat_detection_elimination/find_repeat_detections.py,sha256=e4Y9CyMyd-bLN3il8tu76vI0nVYHZlhZr6vcL0J4zQ0,9832
164
+ megadetector/postprocessing/repeat_detection_elimination/remove_repeat_detections.py,sha256=tARPxuY0OyQgpKU2XqiQPko3f-hHnWuISB8ZlZgXwxI,2819
165
+ megadetector/postprocessing/repeat_detection_elimination/repeat_detections_core.py,sha256=qj9gcvXu_xdpvzIuPVyHfGegOO5R0bdYtXlI9gKrFcM,66513
166
+ megadetector/taxonomy_mapping/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
167
+ megadetector/taxonomy_mapping/map_lila_taxonomy_to_wi_taxonomy.py,sha256=6D_YHTeWTs6O8S9ABog2t9-wfQSh9dW2k9XTqXUZKfo,17927
168
+ megadetector/taxonomy_mapping/map_new_lila_datasets.py,sha256=M-hRnQuqh5QhW-7LmTvYRex1Y2izQFSgEzb92gqqx1M,4062
169
+ megadetector/taxonomy_mapping/prepare_lila_taxonomy_release.py,sha256=N9TUgg3_2u4hc5OBRydvEpweC3RIJ9ry5bXoi1BXLAY,4676
170
+ megadetector/taxonomy_mapping/preview_lila_taxonomy.py,sha256=eYl7tjvSlEH7F7UsRm8YlljQAdITEQvjQb-1NyYbQK8,19583
171
+ megadetector/taxonomy_mapping/retrieve_sample_image.py,sha256=4cfWsLRwS_EwAmQr2p5tA_W6glBK71tSjPfaHxUZQWs,1979
172
+ megadetector/taxonomy_mapping/simple_image_download.py,sha256=_1dEGn4356mdQAy9yzkH5DntPO7-nQyYo2zm08ODpJc,6852
173
+ megadetector/taxonomy_mapping/species_lookup.py,sha256=B5arfF1OVICtTokVOtJcN8W2SxGmq46AO0SfA11Upt8,28291
174
+ megadetector/taxonomy_mapping/taxonomy_csv_checker.py,sha256=A_zPwzY-ERz6xawxgk2Tpfsycl-1sDcjUiuaXXBppi8,4850
175
+ megadetector/taxonomy_mapping/taxonomy_graph.py,sha256=ayrTFseVaIMbtMXhnjWCkZdxI5SAVe_BUtnanGewQpU,12263
176
+ megadetector/taxonomy_mapping/validate_lila_category_mappings.py,sha256=1qyZr23bvZSVUYLQnO1XAtIZ4jdpARA5dxt8euKVyOA,2527
177
+ megadetector/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
178
+ megadetector/utils/azure_utils.py,sha256=0BdnkG2hW-X0yFpsJqmBhOd2wysz_LvhuyImPJMVPJs,6271
179
+ megadetector/utils/ct_utils.py,sha256=mppmjTtRNGgnp0IBoXUPy5uNAanxpgPteVW5ACUi3vg,17847
180
+ megadetector/utils/directory_listing.py,sha256=r4rg2xA4O9ZVxVtzPZzXIXa0DOEukAJMTTNcNSiQcuM,9668
181
+ megadetector/utils/md_tests.py,sha256=FTNB-_5_gICkvbQZ9_m5aPoHc-5PeWokkKvFJ47qTcM,36018
182
+ megadetector/utils/path_utils.py,sha256=kVkz70tZM2RpNpuquqFCydL6ca5n3Grwh0Un2lHpXCA,35948
183
+ megadetector/utils/process_utils.py,sha256=uNzbijLk4lRqj2uU9zlUN8VuDeM4J7aLR2eb2O2-9ys,5226
184
+ megadetector/utils/sas_blob_utils.py,sha256=k76EcMmJc_otrEHcfV2fxAC6fNhxU88FxM3ddSYrsKU,16917
185
+ megadetector/utils/split_locations_into_train_val.py,sha256=jvaDu1xKB51L3Xq2nXQo0XtXRjNRf8RglBApl1g6gHo,10101
186
+ megadetector/utils/string_utils.py,sha256=ZQapJodzvTDyQhjZgMoMl3-9bqnKAUlORpws8Db9AkA,2050
187
+ megadetector/utils/url_utils.py,sha256=uJRsSMxA1zMd997dX3V3wqFnKMTcSiOaE_atXUTRRVI,11476
188
+ megadetector/utils/write_html_image_list.py,sha256=apzoWkgZWG-ybCT4k92PlS4-guN_sNBSMMMbj7Cfm1k,8638
189
+ megadetector/visualization/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
190
+ megadetector/visualization/plot_utils.py,sha256=lOfU3uPrcuHZagV_1SN8erT8PujIepocgw6KZ17Ej6c,10671
191
+ megadetector/visualization/render_images_with_thumbnails.py,sha256=kgJYW8BsqRO4C7T3sqItdBuSkZ64I1vOtIWAsVG4XBI,10589
192
+ megadetector/visualization/visualization_utils.py,sha256=BIb1uCDD6TlHLDM_2uA-4lzcVcdiFLeKu8kuY2fct6g,62150
193
+ megadetector/visualization/visualize_db.py,sha256=l7U4emtNdLGTWU5gB7i7O9yOmvLDBCeZMOAGeKu36rk,20798
194
+ megadetector/visualization/visualize_detector_output.py,sha256=dFpQdLnbULO8wPGeN2z0muYNtHglUDsH-LeqdbYa6DY,17096
195
+ megadetector-5.0.12.dist-info/LICENSE,sha256=RMa3qq-7Cyk7DdtqRj_bP1oInGFgjyHn9-PZ3PcrqIs,1100
196
+ megadetector-5.0.12.dist-info/METADATA,sha256=Hc-G5FqXVt5T1zxOx6qR5E4qpbinZvxBXVKnEqxkkeU,7892
197
+ megadetector-5.0.12.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
198
+ megadetector-5.0.12.dist-info/top_level.txt,sha256=wf9DXa8EwiOSZ4G5IPjakSxBPxTDjhYYnqWRfR-zS4M,13
199
+ megadetector-5.0.12.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
-