megadetector 5.0.9__py3-none-any.whl → 5.0.11__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 (226) hide show
  1. {megadetector-5.0.9.dist-info → megadetector-5.0.11.dist-info}/LICENSE +0 -0
  2. {megadetector-5.0.9.dist-info → megadetector-5.0.11.dist-info}/METADATA +12 -11
  3. megadetector-5.0.11.dist-info/RECORD +5 -0
  4. megadetector-5.0.11.dist-info/top_level.txt +1 -0
  5. api/__init__.py +0 -0
  6. api/batch_processing/__init__.py +0 -0
  7. api/batch_processing/api_core/__init__.py +0 -0
  8. api/batch_processing/api_core/batch_service/__init__.py +0 -0
  9. api/batch_processing/api_core/batch_service/score.py +0 -439
  10. api/batch_processing/api_core/server.py +0 -294
  11. api/batch_processing/api_core/server_api_config.py +0 -98
  12. api/batch_processing/api_core/server_app_config.py +0 -55
  13. api/batch_processing/api_core/server_batch_job_manager.py +0 -220
  14. api/batch_processing/api_core/server_job_status_table.py +0 -152
  15. api/batch_processing/api_core/server_orchestration.py +0 -360
  16. api/batch_processing/api_core/server_utils.py +0 -92
  17. api/batch_processing/api_core_support/__init__.py +0 -0
  18. api/batch_processing/api_core_support/aggregate_results_manually.py +0 -46
  19. api/batch_processing/api_support/__init__.py +0 -0
  20. api/batch_processing/api_support/summarize_daily_activity.py +0 -152
  21. api/batch_processing/data_preparation/__init__.py +0 -0
  22. api/batch_processing/data_preparation/manage_local_batch.py +0 -2391
  23. api/batch_processing/data_preparation/manage_video_batch.py +0 -327
  24. api/batch_processing/integration/digiKam/setup.py +0 -6
  25. api/batch_processing/integration/digiKam/xmp_integration.py +0 -465
  26. api/batch_processing/integration/eMammal/test_scripts/config_template.py +0 -5
  27. api/batch_processing/integration/eMammal/test_scripts/push_annotations_to_emammal.py +0 -126
  28. api/batch_processing/integration/eMammal/test_scripts/select_images_for_testing.py +0 -55
  29. api/batch_processing/postprocessing/__init__.py +0 -0
  30. api/batch_processing/postprocessing/add_max_conf.py +0 -64
  31. api/batch_processing/postprocessing/categorize_detections_by_size.py +0 -163
  32. api/batch_processing/postprocessing/combine_api_outputs.py +0 -249
  33. api/batch_processing/postprocessing/compare_batch_results.py +0 -958
  34. api/batch_processing/postprocessing/convert_output_format.py +0 -397
  35. api/batch_processing/postprocessing/load_api_results.py +0 -195
  36. api/batch_processing/postprocessing/md_to_coco.py +0 -310
  37. api/batch_processing/postprocessing/md_to_labelme.py +0 -330
  38. api/batch_processing/postprocessing/merge_detections.py +0 -401
  39. api/batch_processing/postprocessing/postprocess_batch_results.py +0 -1904
  40. api/batch_processing/postprocessing/remap_detection_categories.py +0 -170
  41. api/batch_processing/postprocessing/render_detection_confusion_matrix.py +0 -661
  42. api/batch_processing/postprocessing/repeat_detection_elimination/find_repeat_detections.py +0 -211
  43. api/batch_processing/postprocessing/repeat_detection_elimination/remove_repeat_detections.py +0 -82
  44. api/batch_processing/postprocessing/repeat_detection_elimination/repeat_detections_core.py +0 -1631
  45. api/batch_processing/postprocessing/separate_detections_into_folders.py +0 -731
  46. api/batch_processing/postprocessing/subset_json_detector_output.py +0 -696
  47. api/batch_processing/postprocessing/top_folders_to_bottom.py +0 -223
  48. api/synchronous/__init__.py +0 -0
  49. api/synchronous/api_core/animal_detection_api/__init__.py +0 -0
  50. api/synchronous/api_core/animal_detection_api/api_backend.py +0 -152
  51. api/synchronous/api_core/animal_detection_api/api_frontend.py +0 -266
  52. api/synchronous/api_core/animal_detection_api/config.py +0 -35
  53. api/synchronous/api_core/animal_detection_api/data_management/annotations/annotation_constants.py +0 -47
  54. api/synchronous/api_core/animal_detection_api/detection/detector_training/copy_checkpoints.py +0 -43
  55. api/synchronous/api_core/animal_detection_api/detection/detector_training/model_main_tf2.py +0 -114
  56. api/synchronous/api_core/animal_detection_api/detection/process_video.py +0 -543
  57. api/synchronous/api_core/animal_detection_api/detection/pytorch_detector.py +0 -304
  58. api/synchronous/api_core/animal_detection_api/detection/run_detector.py +0 -627
  59. api/synchronous/api_core/animal_detection_api/detection/run_detector_batch.py +0 -1029
  60. api/synchronous/api_core/animal_detection_api/detection/run_inference_with_yolov5_val.py +0 -581
  61. api/synchronous/api_core/animal_detection_api/detection/run_tiled_inference.py +0 -754
  62. api/synchronous/api_core/animal_detection_api/detection/tf_detector.py +0 -165
  63. api/synchronous/api_core/animal_detection_api/detection/video_utils.py +0 -495
  64. api/synchronous/api_core/animal_detection_api/md_utils/azure_utils.py +0 -174
  65. api/synchronous/api_core/animal_detection_api/md_utils/ct_utils.py +0 -262
  66. api/synchronous/api_core/animal_detection_api/md_utils/directory_listing.py +0 -251
  67. api/synchronous/api_core/animal_detection_api/md_utils/matlab_porting_tools.py +0 -97
  68. api/synchronous/api_core/animal_detection_api/md_utils/path_utils.py +0 -416
  69. api/synchronous/api_core/animal_detection_api/md_utils/process_utils.py +0 -110
  70. api/synchronous/api_core/animal_detection_api/md_utils/sas_blob_utils.py +0 -509
  71. api/synchronous/api_core/animal_detection_api/md_utils/string_utils.py +0 -59
  72. api/synchronous/api_core/animal_detection_api/md_utils/url_utils.py +0 -144
  73. api/synchronous/api_core/animal_detection_api/md_utils/write_html_image_list.py +0 -226
  74. api/synchronous/api_core/animal_detection_api/md_visualization/visualization_utils.py +0 -841
  75. api/synchronous/api_core/tests/__init__.py +0 -0
  76. api/synchronous/api_core/tests/load_test.py +0 -110
  77. classification/__init__.py +0 -0
  78. classification/aggregate_classifier_probs.py +0 -108
  79. classification/analyze_failed_images.py +0 -227
  80. classification/cache_batchapi_outputs.py +0 -198
  81. classification/create_classification_dataset.py +0 -627
  82. classification/crop_detections.py +0 -516
  83. classification/csv_to_json.py +0 -226
  84. classification/detect_and_crop.py +0 -855
  85. classification/efficientnet/__init__.py +0 -9
  86. classification/efficientnet/model.py +0 -415
  87. classification/efficientnet/utils.py +0 -610
  88. classification/evaluate_model.py +0 -520
  89. classification/identify_mislabeled_candidates.py +0 -152
  90. classification/json_to_azcopy_list.py +0 -63
  91. classification/json_validator.py +0 -695
  92. classification/map_classification_categories.py +0 -276
  93. classification/merge_classification_detection_output.py +0 -506
  94. classification/prepare_classification_script.py +0 -194
  95. classification/prepare_classification_script_mc.py +0 -228
  96. classification/run_classifier.py +0 -286
  97. classification/save_mislabeled.py +0 -110
  98. classification/train_classifier.py +0 -825
  99. classification/train_classifier_tf.py +0 -724
  100. classification/train_utils.py +0 -322
  101. data_management/__init__.py +0 -0
  102. data_management/annotations/__init__.py +0 -0
  103. data_management/annotations/annotation_constants.py +0 -34
  104. data_management/camtrap_dp_to_coco.py +0 -238
  105. data_management/cct_json_utils.py +0 -395
  106. data_management/cct_to_md.py +0 -176
  107. data_management/cct_to_wi.py +0 -289
  108. data_management/coco_to_labelme.py +0 -272
  109. data_management/coco_to_yolo.py +0 -662
  110. data_management/databases/__init__.py +0 -0
  111. data_management/databases/add_width_and_height_to_db.py +0 -33
  112. data_management/databases/combine_coco_camera_traps_files.py +0 -206
  113. data_management/databases/integrity_check_json_db.py +0 -477
  114. data_management/databases/subset_json_db.py +0 -115
  115. data_management/generate_crops_from_cct.py +0 -149
  116. data_management/get_image_sizes.py +0 -188
  117. data_management/importers/add_nacti_sizes.py +0 -52
  118. data_management/importers/add_timestamps_to_icct.py +0 -79
  119. data_management/importers/animl_results_to_md_results.py +0 -158
  120. data_management/importers/auckland_doc_test_to_json.py +0 -372
  121. data_management/importers/auckland_doc_to_json.py +0 -200
  122. data_management/importers/awc_to_json.py +0 -189
  123. data_management/importers/bellevue_to_json.py +0 -273
  124. data_management/importers/cacophony-thermal-importer.py +0 -796
  125. data_management/importers/carrizo_shrubfree_2018.py +0 -268
  126. data_management/importers/carrizo_trail_cam_2017.py +0 -287
  127. data_management/importers/cct_field_adjustments.py +0 -57
  128. data_management/importers/channel_islands_to_cct.py +0 -913
  129. data_management/importers/eMammal/copy_and_unzip_emammal.py +0 -180
  130. data_management/importers/eMammal/eMammal_helpers.py +0 -249
  131. data_management/importers/eMammal/make_eMammal_json.py +0 -223
  132. data_management/importers/ena24_to_json.py +0 -275
  133. data_management/importers/filenames_to_json.py +0 -385
  134. data_management/importers/helena_to_cct.py +0 -282
  135. data_management/importers/idaho-camera-traps.py +0 -1407
  136. data_management/importers/idfg_iwildcam_lila_prep.py +0 -294
  137. data_management/importers/jb_csv_to_json.py +0 -150
  138. data_management/importers/mcgill_to_json.py +0 -250
  139. data_management/importers/missouri_to_json.py +0 -489
  140. data_management/importers/nacti_fieldname_adjustments.py +0 -79
  141. data_management/importers/noaa_seals_2019.py +0 -181
  142. data_management/importers/pc_to_json.py +0 -365
  143. data_management/importers/plot_wni_giraffes.py +0 -123
  144. data_management/importers/prepare-noaa-fish-data-for-lila.py +0 -359
  145. data_management/importers/prepare_zsl_imerit.py +0 -131
  146. data_management/importers/rspb_to_json.py +0 -356
  147. data_management/importers/save_the_elephants_survey_A.py +0 -320
  148. data_management/importers/save_the_elephants_survey_B.py +0 -332
  149. data_management/importers/snapshot_safari_importer.py +0 -758
  150. data_management/importers/snapshot_safari_importer_reprise.py +0 -665
  151. data_management/importers/snapshot_serengeti_lila.py +0 -1067
  152. data_management/importers/snapshotserengeti/make_full_SS_json.py +0 -150
  153. data_management/importers/snapshotserengeti/make_per_season_SS_json.py +0 -153
  154. data_management/importers/sulross_get_exif.py +0 -65
  155. data_management/importers/timelapse_csv_set_to_json.py +0 -490
  156. data_management/importers/ubc_to_json.py +0 -399
  157. data_management/importers/umn_to_json.py +0 -507
  158. data_management/importers/wellington_to_json.py +0 -263
  159. data_management/importers/wi_to_json.py +0 -441
  160. data_management/importers/zamba_results_to_md_results.py +0 -181
  161. data_management/labelme_to_coco.py +0 -548
  162. data_management/labelme_to_yolo.py +0 -272
  163. data_management/lila/__init__.py +0 -0
  164. data_management/lila/add_locations_to_island_camera_traps.py +0 -97
  165. data_management/lila/add_locations_to_nacti.py +0 -147
  166. data_management/lila/create_lila_blank_set.py +0 -557
  167. data_management/lila/create_lila_test_set.py +0 -151
  168. data_management/lila/create_links_to_md_results_files.py +0 -106
  169. data_management/lila/download_lila_subset.py +0 -177
  170. data_management/lila/generate_lila_per_image_labels.py +0 -515
  171. data_management/lila/get_lila_annotation_counts.py +0 -170
  172. data_management/lila/get_lila_image_counts.py +0 -111
  173. data_management/lila/lila_common.py +0 -300
  174. data_management/lila/test_lila_metadata_urls.py +0 -132
  175. data_management/ocr_tools.py +0 -874
  176. data_management/read_exif.py +0 -681
  177. data_management/remap_coco_categories.py +0 -84
  178. data_management/remove_exif.py +0 -66
  179. data_management/resize_coco_dataset.py +0 -189
  180. data_management/wi_download_csv_to_coco.py +0 -246
  181. data_management/yolo_output_to_md_output.py +0 -441
  182. data_management/yolo_to_coco.py +0 -676
  183. detection/__init__.py +0 -0
  184. detection/detector_training/__init__.py +0 -0
  185. detection/detector_training/model_main_tf2.py +0 -114
  186. detection/process_video.py +0 -703
  187. detection/pytorch_detector.py +0 -337
  188. detection/run_detector.py +0 -779
  189. detection/run_detector_batch.py +0 -1219
  190. detection/run_inference_with_yolov5_val.py +0 -917
  191. detection/run_tiled_inference.py +0 -935
  192. detection/tf_detector.py +0 -188
  193. detection/video_utils.py +0 -606
  194. docs/source/conf.py +0 -43
  195. md_utils/__init__.py +0 -0
  196. md_utils/azure_utils.py +0 -174
  197. md_utils/ct_utils.py +0 -612
  198. md_utils/directory_listing.py +0 -246
  199. md_utils/md_tests.py +0 -968
  200. md_utils/path_utils.py +0 -1044
  201. md_utils/process_utils.py +0 -157
  202. md_utils/sas_blob_utils.py +0 -509
  203. md_utils/split_locations_into_train_val.py +0 -228
  204. md_utils/string_utils.py +0 -92
  205. md_utils/url_utils.py +0 -323
  206. md_utils/write_html_image_list.py +0 -225
  207. md_visualization/__init__.py +0 -0
  208. md_visualization/plot_utils.py +0 -293
  209. md_visualization/render_images_with_thumbnails.py +0 -275
  210. md_visualization/visualization_utils.py +0 -1537
  211. md_visualization/visualize_db.py +0 -551
  212. md_visualization/visualize_detector_output.py +0 -406
  213. megadetector-5.0.9.dist-info/RECORD +0 -224
  214. megadetector-5.0.9.dist-info/top_level.txt +0 -8
  215. taxonomy_mapping/__init__.py +0 -0
  216. taxonomy_mapping/map_lila_taxonomy_to_wi_taxonomy.py +0 -491
  217. taxonomy_mapping/map_new_lila_datasets.py +0 -154
  218. taxonomy_mapping/prepare_lila_taxonomy_release.py +0 -142
  219. taxonomy_mapping/preview_lila_taxonomy.py +0 -591
  220. taxonomy_mapping/retrieve_sample_image.py +0 -71
  221. taxonomy_mapping/simple_image_download.py +0 -218
  222. taxonomy_mapping/species_lookup.py +0 -834
  223. taxonomy_mapping/taxonomy_csv_checker.py +0 -159
  224. taxonomy_mapping/taxonomy_graph.py +0 -346
  225. taxonomy_mapping/validate_lila_category_mappings.py +0 -83
  226. {megadetector-5.0.9.dist-info → megadetector-5.0.11.dist-info}/WHEEL +0 -0
@@ -1,406 +0,0 @@
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
- from multiprocessing.pool import ThreadPool
18
- from multiprocessing.pool import Pool
19
- from typing import List
20
- from functools import partial
21
-
22
- from tqdm import tqdm
23
-
24
- from data_management.annotations.annotation_constants import detector_bbox_category_id_to_name
25
- from md_visualization import visualization_utils as vis_utils
26
- from md_utils.ct_utils import get_max_conf
27
- from md_utils import write_html_image_list
28
- from detection.run_detector import get_typical_confidence_threshold_from_results
29
-
30
-
31
- #%% Constants
32
-
33
- # This will only be used if a category mapping is not available in the results file.
34
- DEFAULT_DETECTOR_LABEL_MAP = {
35
- str(k): v for k, v in detector_bbox_category_id_to_name.items()
36
- }
37
-
38
-
39
- #%% Support functions
40
-
41
- def _render_image(entry,
42
- detector_label_map,classification_label_map,
43
- confidence_threshold,classification_confidence_threshold,
44
- render_detections_only,preserve_path_structure,out_dir,images_dir,
45
- output_image_width):
46
- """
47
- Internal function for rendering a single image.
48
- """
49
-
50
- rendering_result = {'failed_image':False,'missing_image':False,
51
- 'skipped_image':False,'annotated_image_path':None,
52
- 'max_conf':None,'file':entry['file']}
53
-
54
- image_id = entry['file']
55
-
56
- if 'failure' in entry and entry['failure'] is not None:
57
- rendering_result['failed_image'] = True
58
- return rendering_result
59
-
60
- assert 'detections' in entry and entry['detections'] is not None
61
-
62
- max_conf = get_max_conf(entry)
63
- rendering_result['max_conf'] = max_conf
64
-
65
- if (max_conf < confidence_threshold) and render_detections_only:
66
- rendering_result['skipped_image'] = True
67
- return rendering_result
68
-
69
- image_obj = os.path.join(images_dir, image_id)
70
- if not os.path.exists(image_obj):
71
- print(f'Image {image_id} not found in images_dir')
72
- rendering_result['missing_image'] = True
73
- return rendering_result
74
-
75
- # If output_image_width is -1 or None, this will just return the original image
76
- image = vis_utils.resize_image(
77
- vis_utils.open_image(image_obj), output_image_width)
78
-
79
- vis_utils.render_detection_bounding_boxes(
80
- entry['detections'], image,
81
- label_map=detector_label_map,
82
- classification_label_map=classification_label_map,
83
- confidence_threshold=confidence_threshold,
84
- classification_confidence_threshold=classification_confidence_threshold)
85
-
86
- if not preserve_path_structure:
87
- for char in ['/', '\\', ':']:
88
- image_id = image_id.replace(char, '~')
89
- annotated_img_path = os.path.join(out_dir, f'anno_{image_id}')
90
- else:
91
- assert not os.path.isabs(image_id), "Can't preserve paths when operating on absolute paths"
92
- annotated_img_path = os.path.join(out_dir, image_id)
93
- os.makedirs(os.path.dirname(annotated_img_path),exist_ok=True)
94
-
95
- image.save(annotated_img_path)
96
- rendering_result['annotated_image_path'] = annotated_img_path
97
-
98
- return rendering_result
99
-
100
-
101
- #%% Main function
102
-
103
- def visualize_detector_output(detector_output_path,
104
- out_dir,
105
- images_dir,
106
- confidence_threshold=0.15,
107
- sample=-1,
108
- output_image_width=700,
109
- random_seed=None,
110
- render_detections_only=False,
111
- classification_confidence_threshold=0.1,
112
- html_output_file=None,
113
- html_output_options=None,
114
- preserve_path_structure=False,
115
- parallelize_rendering=False,
116
- parallelize_rendering_n_cores=10,
117
- parallelize_rendering_with_threads=True):
118
-
119
- """
120
- Draws bounding boxes on images given the output of a detector.
121
-
122
- Args:
123
- detector_output_path (str): path to detector output .json file
124
- out_dir (str): path to directory for saving annotated images
125
- images_dir (str): folder where the images live; filenames in
126
- [detector_output_path] should be relative to [image_dir]
127
- confidence_threshold (float, optional): threshold above which detections will be rendered
128
- sample (int, optional): maximum number of images to render, -1 for all
129
- output_image_width (int, optional): width in pixels to resize images for display,
130
- preserving aspect ration; set to -1 to use original image width
131
- random_seed (int, optional): seed to use for choosing images when sample != -1
132
- render_detections_only (bool): only render images with above-threshold detections
133
- classification_confidence_threshold (float, optional): only show classifications
134
- above this threshold; does not impact whether images are rendered, only whether
135
- classification labels (not detection categories) are displayed
136
- html_output_file (str, optional): output path for an HTML index file (not written
137
- if None)
138
- html_output_options (dict, optional): HTML formatting options; see write_html_image_list
139
- for details
140
- preserve_path_structure (bool, optional): if False (default), writes images to unique
141
- names in a flat structure in the output folder; if True, preserves relative paths
142
- within the output folder
143
- parallelize_rendering (bool, optional): whether to use concurrent workers for rendering
144
- parallelize_rendering_n_cores (int, optional): number of concurrent workers to use
145
- (ignored if parallelize_rendering is False)
146
- parallelize_rendering_with_threads (bool, optional): determines whether we use
147
- threads (True) or processes (False) for parallelization (ignored if parallelize_rendering
148
- is False)
149
-
150
- Returns:
151
- list: list of paths to annotated images
152
- """
153
-
154
- assert os.path.exists(detector_output_path), \
155
- 'Detector output file does not exist at {}'.format(detector_output_path)
156
-
157
- assert os.path.isdir(images_dir), \
158
- 'Image folder {} is not available'.format(images_dir)
159
-
160
- os.makedirs(out_dir, exist_ok=True)
161
-
162
-
163
- ##%% Load detector output
164
-
165
- with open(detector_output_path) as f:
166
- detector_output = json.load(f)
167
- assert 'images' in detector_output, (
168
- 'Detector output file should be a json with an "images" field.')
169
- images = detector_output['images']
170
-
171
- if confidence_threshold is None:
172
- confidence_threshold = get_typical_confidence_threshold_from_results(detector_output)
173
-
174
- assert confidence_threshold >= 0 and confidence_threshold <= 1, (
175
- f'Confidence threshold {confidence_threshold} is invalid, must be in (0, 1).')
176
-
177
- if 'detection_categories' in detector_output:
178
- print('Using custom label mapping')
179
- detector_label_map = detector_output['detection_categories']
180
- else:
181
- detector_label_map = DEFAULT_DETECTOR_LABEL_MAP
182
-
183
- num_images = len(images)
184
- print(f'Detector output file contains {num_images} entries.')
185
-
186
- if sample > 0:
187
- assert num_images >= sample, (
188
- f'Sample size {sample} greater than number of entries '
189
- f'({num_images}) in detector result.')
190
-
191
- if random_seed is not None:
192
- images = sorted(images, key=lambda x: x['file'])
193
- random.seed(random_seed)
194
-
195
- random.shuffle(images)
196
- images = sorted(images[:sample], key=lambda x: x['file'])
197
- print(f'Sampled {len(images)} entries from the detector output file.')
198
-
199
-
200
- ##%% Load images, annotate them and save
201
-
202
- print('Rendering detections above a confidence threshold of {}'.format(
203
- confidence_threshold))
204
-
205
- classification_label_map = None
206
-
207
- if 'classification_categories' in detector_output:
208
- classification_label_map = detector_output['classification_categories']
209
-
210
- rendering_results = []
211
-
212
- if parallelize_rendering:
213
-
214
- if parallelize_rendering_with_threads:
215
- worker_string = 'threads'
216
- else:
217
- worker_string = 'processes'
218
-
219
- if parallelize_rendering_n_cores is None:
220
- if parallelize_rendering_with_threads:
221
- pool = ThreadPool()
222
- else:
223
- pool = Pool()
224
- else:
225
- if parallelize_rendering_with_threads:
226
- pool = ThreadPool(parallelize_rendering_n_cores)
227
- else:
228
- pool = Pool(parallelize_rendering_n_cores)
229
- print('Rendering images with {} {}'.format(parallelize_rendering_n_cores,
230
- worker_string))
231
- rendering_results = list(tqdm(pool.imap(
232
- partial(_render_image,detector_label_map=detector_label_map,
233
- classification_label_map=classification_label_map,
234
- confidence_threshold=confidence_threshold,
235
- classification_confidence_threshold=classification_confidence_threshold,
236
- render_detections_only=render_detections_only,
237
- preserve_path_structure=preserve_path_structure,
238
- out_dir=out_dir,
239
- images_dir=images_dir,
240
- output_image_width=output_image_width),
241
- images), total=len(images)))
242
-
243
- else:
244
-
245
- for entry in tqdm(images):
246
-
247
- rendering_result = _render_image(entry,detector_label_map,classification_label_map,
248
- confidence_threshold,classification_confidence_threshold,
249
- render_detections_only,preserve_path_structure,out_dir,
250
- images_dir,output_image_width)
251
- rendering_results.append(rendering_result)
252
-
253
- # ...for each image
254
-
255
- failed_images = [r for r in rendering_results if r['failed_image']]
256
- missing_images = [r for r in rendering_results if r['missing_image']]
257
- skipped_images = [r for r in rendering_results if r['skipped_image']]
258
-
259
- print('Skipped {} failed images (of {})'.format(len(failed_images),len(images)))
260
- print('Skipped {} missing images (of {})'.format(len(missing_images),len(images)))
261
- print('Skipped {} below-threshold images (of {})'.format(len(skipped_images),len(images)))
262
-
263
- print(f'Rendered detection results to {out_dir}')
264
-
265
- annotated_image_paths = [r['annotated_image_path'] for r in rendering_results if \
266
- r['annotated_image_path'] is not None]
267
-
268
- if html_output_file is not None:
269
-
270
- html_dir = os.path.dirname(html_output_file)
271
-
272
- html_image_info = []
273
-
274
- for r in rendering_results:
275
- d = {}
276
- annotated_image_path_relative = os.path.relpath(r['annotated_image_path'],html_dir)
277
- d['filename'] = annotated_image_path_relative
278
- d['textStyle'] = \
279
- 'font-family:verdana,arial,calibri;font-size:80%;' + \
280
- 'text-align:left;margin-top:20;margin-bottom:5'
281
- d['title'] = '{} (max conf: {})'.format(r['file'],r['max_conf'])
282
- html_image_info.append(d)
283
-
284
- _ = write_html_image_list.write_html_image_list(html_output_file,html_image_info,
285
- options=html_output_options)
286
-
287
- return annotated_image_paths
288
-
289
-
290
- #%% Command-line driver
291
-
292
- def main():
293
-
294
- parser = argparse.ArgumentParser(
295
- formatter_class=argparse.ArgumentDefaultsHelpFormatter,
296
- description='Annotate the bounding boxes predicted by a detector above '
297
- 'some confidence threshold, and save the annotated images.')
298
- parser.add_argument(
299
- 'detector_output_path', type=str,
300
- help='Path to json output file of the detector')
301
- parser.add_argument(
302
- 'out_dir', type=str,
303
- help='Path to directory where the annotated images will be saved. '
304
- 'The directory will be created if it does not exist.')
305
- parser.add_argument(
306
- '-c', '--confidence', type=float, default=0.15,
307
- help='Value between 0 and 1, indicating the confidence threshold '
308
- 'above which to visualize bounding boxes')
309
- parser.add_argument(
310
- '-i', '--images_dir', type=str, default=None,
311
- help='Path to a local directory where images are stored. This '
312
- 'serves as the root directory for image paths in '
313
- 'detector_output_path.')
314
- parser.add_argument(
315
- '-n', '--sample', type=int, default=-1,
316
- help='Number of images to be annotated and rendered. Set to -1 '
317
- '(default) to annotate all images in the detector output file. '
318
- 'There may be fewer images if some are not found in images_dir.')
319
- parser.add_argument(
320
- '-w', '--output_image_width', type=int, default=700,
321
- help='Integer, desired width in pixels of the output annotated images. '
322
- 'Use -1 to not resize. Default: 700.')
323
- parser.add_argument(
324
- '-r', '--random_seed', type=int, default=None,
325
- help='Integer, for deterministic order of image sampling')
326
- parser.add_argument(
327
- '-html', '--html_output_file', type=str, default=None,
328
- help='Filename to which we should write an HTML image index (off by default)')
329
- parser.add_argument(
330
- '--open_html_output_file', action='store_true',
331
- help='Open the .html output file when done')
332
- parser.add_argument(
333
- '-do', '--detections_only', action='store_true',
334
- help='Only render images with above-threshold detections (by default, '
335
- 'both empty and non-empty images are rendered).')
336
- parser.add_argument(
337
- '-pps', '--preserve_path_structure', action='store_true',
338
- help='Preserve relative image paths (otherwise flattens and assigns unique file names)')
339
-
340
- if len(sys.argv[1:]) == 0:
341
- parser.print_help()
342
- parser.exit()
343
-
344
- args = parser.parse_args()
345
- visualize_detector_output(
346
- detector_output_path=args.detector_output_path,
347
- out_dir=args.out_dir,
348
- confidence_threshold=args.confidence,
349
- images_dir=args.images_dir,
350
- sample=args.sample,
351
- output_image_width=args.output_image_width,
352
- random_seed=args.random_seed,
353
- render_detections_only=args.detections_only,
354
- preserve_path_structure=args.preserve_path_structure,
355
- html_output_file=args.html_output_file)
356
-
357
- if args.html_output_file is not None and args.open_html_output_file:
358
- from md_utils.path_utils import open_file
359
- open_file(args.html_output_file)
360
-
361
- if __name__ == '__main__':
362
- main()
363
-
364
-
365
- #%% Interactive driver
366
-
367
- if False:
368
-
369
- pass
370
-
371
- #%%
372
-
373
- 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')
374
- out_dir = r'g:\temp\preview'
375
- images_dir = r'g:\camera_traps\camera_trap_images'
376
- confidence_threshold = 0.15
377
- sample = 50
378
- output_image_width = 700
379
- random_seed = 1
380
- render_detections_only = True
381
- classification_confidence_threshold = 0.1
382
- html_output_file = os.path.join(out_dir,'index.html')
383
- html_output_options = None
384
- preserve_path_structure = False
385
- parallelize_rendering = True
386
- parallelize_rendering_n_cores = 10
387
- parallelize_rendering_with_threads = False
388
-
389
- _ = visualize_detector_output(detector_output_path,
390
- out_dir,
391
- images_dir,
392
- confidence_threshold,
393
- sample,
394
- output_image_width,
395
- random_seed,
396
- render_detections_only,
397
- classification_confidence_threshold,
398
- html_output_file,
399
- html_output_options,
400
- preserve_path_structure,
401
- parallelize_rendering,
402
- parallelize_rendering_n_cores,
403
- parallelize_rendering_with_threads)
404
-
405
- from md_utils.path_utils import open_file
406
- open_file(html_output_file)
@@ -1,224 +0,0 @@
1
- api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- api/batch_processing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- api/batch_processing/api_core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- api/batch_processing/api_core/server.py,sha256=BNqM5EK29B0haCW7rdeOzVqcCJDziZiD0Etc1mPs56c,11668
5
- api/batch_processing/api_core/server_api_config.py,sha256=G8X5wgqEXPrWWQpgDI9ua-JktiUgy9mOpEltXSIazLQ,3318
6
- api/batch_processing/api_core/server_app_config.py,sha256=tQCFsFv0wJCegHfnu-Za3okdXwEd4U522hiM0YGNkMY,1860
7
- api/batch_processing/api_core/server_batch_job_manager.py,sha256=K7fMFBJA8Z1SkA4eBM-nymcq7VQjwZ6ZRaNnNKFlat8,10324
8
- api/batch_processing/api_core/server_job_status_table.py,sha256=3fJrdyeoVLGbbbdKy7cAVL_ZHbCmCQ2o5D26jBBQRJo,6239
9
- api/batch_processing/api_core/server_orchestration.py,sha256=LYHABzhOvP0NrM1VIjI6Vwb95YZ5xjQ52mUJW8oIOQ0,17003
10
- api/batch_processing/api_core/server_utils.py,sha256=oFusP1E29op5DN1nEaR-jQZgRExqMDdzmRL6BHj8EDk,3314
11
- api/batch_processing/api_core/batch_service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
- api/batch_processing/api_core/batch_service/score.py,sha256=hGgvjbXZTyk2lGdYDg1zWQLwQ_Yboj5p_EhbjbXcud8,17346
13
- api/batch_processing/api_core_support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
- api/batch_processing/api_core_support/aggregate_results_manually.py,sha256=pPLRVb54kMzcndiRQx0JGna3v9cSX__hBc_7PZ8NFEU,2274
15
- api/batch_processing/api_support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
- api/batch_processing/api_support/summarize_daily_activity.py,sha256=5H3DyXtdIW5uCp09Fbu9Tdf0hgfNKYnzv7v8Q7CPsDc,5382
17
- api/batch_processing/data_preparation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
- api/batch_processing/data_preparation/manage_local_batch.py,sha256=7vTSAsw6LErwvC0sORNDuOrWdHZY6mwN3MRwObmOUo4,89072
19
- api/batch_processing/data_preparation/manage_video_batch.py,sha256=53QiCL1vxJfKA8BmC2wr-aJKWE6KfUchuuJkp6C0D1E,9649
20
- api/batch_processing/integration/digiKam/setup.py,sha256=7P1X3JYrBDXmLUeLRrzxNfDkL5lo-pY8nXsp9Cz8rOI,203
21
- api/batch_processing/integration/digiKam/xmp_integration.py,sha256=zk5s7dD-FIkNnRxECT-0TAuBw7R__Or5_ft7Ha3iqMM,17774
22
- api/batch_processing/integration/eMammal/test_scripts/config_template.py,sha256=UnvrgaFRBu59MuVUJa2WpG8ebcOJWcNeZEx6GWuYLzc,73
23
- api/batch_processing/integration/eMammal/test_scripts/push_annotations_to_emammal.py,sha256=_mfKTNfLtQKaOK5YuG5mTm_Q_24_0K4wR3eLzJwXVPs,3607
24
- api/batch_processing/integration/eMammal/test_scripts/select_images_for_testing.py,sha256=OYMu97p8vprSv03QcnS6aSxPBocn9sgaozfUqq_JpyM,1369
25
- api/batch_processing/postprocessing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
- api/batch_processing/postprocessing/add_max_conf.py,sha256=0t8c1mTsr9XIZzd0iAo7YMg0RkX6F12ltmTQMeCmpv8,1504
27
- api/batch_processing/postprocessing/categorize_detections_by_size.py,sha256=JsZSYjN40HprrcOozruJ1sTb0tY9V7e7G8wjFZr5lKU,5677
28
- api/batch_processing/postprocessing/combine_api_outputs.py,sha256=QdAjFhBzoCW1tlC5hGhkII5E91JS1tyMvJcC5k7us6A,8524
29
- api/batch_processing/postprocessing/compare_batch_results.py,sha256=JgNsZat4jVOKonschgD-LaIOszV-XFAEzCqo-77xTt4,38211
30
- api/batch_processing/postprocessing/convert_output_format.py,sha256=66bgy6dGkP4_EM4VnC0WLe6NQ-X-mb3AyIuj2RQr7WU,14977
31
- api/batch_processing/postprocessing/load_api_results.py,sha256=ItFPOIZhld-Tvse_zfzQighgPzs6pcRbQfLbYLUcwQA,6851
32
- api/batch_processing/postprocessing/md_to_coco.py,sha256=YCYH7oS5o4j6NupM1Yh7637KgOzoUqSh0zvfaJIkIug,11019
33
- api/batch_processing/postprocessing/md_to_labelme.py,sha256=c18CTlY3EiyU8sh0B8irIh22Caq-D-bdhwA5c4gv468,11670
34
- api/batch_processing/postprocessing/merge_detections.py,sha256=L_LfwcNEiPUya_xbj4NRpGAuCCJj6oQ4iWNbr8ff5hg,17163
35
- api/batch_processing/postprocessing/postprocess_batch_results.py,sha256=WVOGZLTQu5uWh0GJuj_3i1p6tKKUzdgp0Icxt268u7I,77286
36
- api/batch_processing/postprocessing/remap_detection_categories.py,sha256=cSvNYkbyCTAnrBlj7IOahVObiXrYYWAbhHSUAuCWj5s,6630
37
- api/batch_processing/postprocessing/render_detection_confusion_matrix.py,sha256=3JuvdgimxFkrecpphWzmOK6QyWR3MAkYPEY2MgQ9gDc,27342
38
- api/batch_processing/postprocessing/separate_detections_into_folders.py,sha256=1R0Gsg0uUuhf5y5FHK3iDB-J8RjBMHfs2tKlBilFwGQ,31181
39
- api/batch_processing/postprocessing/subset_json_detector_output.py,sha256=grJSfRUuP_3-inBdulOgpyElftsxYghXEioo2ezgBaQ,26404
40
- api/batch_processing/postprocessing/top_folders_to_bottom.py,sha256=O5FGvIseufNn8E2gT6ndo6qpxoR6zmWsA6diOqTDfXU,6273
41
- api/batch_processing/postprocessing/repeat_detection_elimination/find_repeat_detections.py,sha256=oCyMkFkUj4987DmsGpyYE-F31IfasV-Xj52ZKYTPhkY,9840
42
- api/batch_processing/postprocessing/repeat_detection_elimination/remove_repeat_detections.py,sha256=I4HgQm8X2atupmVE2adAOrxxjK-ScKnoAY3M95sJsgU,2836
43
- api/batch_processing/postprocessing/repeat_detection_elimination/repeat_detections_core.py,sha256=ot6FW7hIWgp_TS_2LGYchNrP_1vAR7HxKN64SnwxIb4,66477
44
- api/synchronous/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
45
- api/synchronous/api_core/animal_detection_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
- api/synchronous/api_core/animal_detection_api/api_backend.py,sha256=MZEGFmmC3IzLms8vEvSmRGQYAp1xh6gomfZgtYzV3HQ,4932
47
- api/synchronous/api_core/animal_detection_api/api_frontend.py,sha256=_a-B81jVhqUD2hKQazJnf4WzImvbwrBuwtTIxJdExMY,10420
48
- api/synchronous/api_core/animal_detection_api/config.py,sha256=05fVcLx0KK3wWFi62Mr-m_soewVn81qqeObUh-a2mrA,982
49
- api/synchronous/api_core/animal_detection_api/data_management/annotations/annotation_constants.py,sha256=P2CZCbAE0ImLLfaNRb1SMlP3q1fULWAIjgrYOrF9L0g,1566
50
- api/synchronous/api_core/animal_detection_api/detection/process_video.py,sha256=b2xcQThAdlgirumxynHULYLviCr_q5sCDfdkKEqVFyU,22089
51
- api/synchronous/api_core/animal_detection_api/detection/pytorch_detector.py,sha256=nI2xctI6FSdbWjSFHYlMT0LTH6CCATOe9DF-I8MLEpc,11505
52
- api/synchronous/api_core/animal_detection_api/detection/run_detector.py,sha256=LBveNOLE3AWSTcQ1MUbbWXaQIutr9e2vtz6RG2SjlWQ,23821
53
- api/synchronous/api_core/animal_detection_api/detection/run_detector_batch.py,sha256=eivQu5yee5WtBmNQRQ2p636Gf8IB5slyrQL4QRZ2HeM,41849
54
- api/synchronous/api_core/animal_detection_api/detection/run_inference_with_yolov5_val.py,sha256=yxMFxQQDvkydWVpM0ecopDXtPi89gaqMX0TKjyxNyjI,22118
55
- api/synchronous/api_core/animal_detection_api/detection/run_tiled_inference.py,sha256=cs1IehE2DXj8Nr3CbnYMXqwcFM1vUBT1Rm5We5nlcSM,28785
56
- api/synchronous/api_core/animal_detection_api/detection/tf_detector.py,sha256=xOO8kzd-Um2X_sAZyop524LM53nipv5pNx8YueGTJrc,6760
57
- api/synchronous/api_core/animal_detection_api/detection/video_utils.py,sha256=E96hywSwA_jTUcJNFdkneKPcH0XH_e2qRT5ovV-5SFM,18317
58
- api/synchronous/api_core/animal_detection_api/detection/detector_training/copy_checkpoints.py,sha256=t2c3Q4Pf82tAp_OjSG-veIjRPrX0tJYi-bSQmGL2m4c,1091
59
- api/synchronous/api_core/animal_detection_api/detection/detector_training/model_main_tf2.py,sha256=YwNsZ7hkIFaEuwKU0rHG_VyqiR_0E01BbdlD0Yx4Smo,4936
60
- api/synchronous/api_core/animal_detection_api/md_utils/azure_utils.py,sha256=SVoQNSknYlBcpZeGrH2v3Qgm5kXxBrqM5Sx2L_Lax-I,6243
61
- api/synchronous/api_core/animal_detection_api/md_utils/ct_utils.py,sha256=3_8p5wNnopQZPCIbchQXYnJmhuUTcDw46I4SK3qb--g,7600
62
- api/synchronous/api_core/animal_detection_api/md_utils/directory_listing.py,sha256=b3yUwZqK7LdvswXenDo4Y0ue4f4zjgpvncfZmzPGBpI,9598
63
- api/synchronous/api_core/animal_detection_api/md_utils/matlab_porting_tools.py,sha256=9IFR_uWM1egCMZT3MgoUmdOP8mp7CcF7L9HEbN_A_1E,2005
64
- api/synchronous/api_core/animal_detection_api/md_utils/path_utils.py,sha256=9ZMyzejC_kzAQlymXGghAAgp_WjCjLuOxWJrAC13TAk,12397
65
- api/synchronous/api_core/animal_detection_api/md_utils/process_utils.py,sha256=_LMebsTQX2PFxERj0-LoC-XCua23RPw3heu-ckp0Tjo,3049
66
- api/synchronous/api_core/animal_detection_api/md_utils/sas_blob_utils.py,sha256=GpjHn33N2b-XeBAtU3xhGbTIYcBs4YrXHtbQDmlGFvY,16955
67
- api/synchronous/api_core/animal_detection_api/md_utils/string_utils.py,sha256=tFTC9TarPFGa7_UkKF0_t6Q2naH9IEsDVM2DOxwkFTQ,1277
68
- api/synchronous/api_core/animal_detection_api/md_utils/url_utils.py,sha256=aFN7_WvzMJqYHL9t-SGCP2A0-mlYu1-P0HkZwgzUsKg,4598
69
- api/synchronous/api_core/animal_detection_api/md_utils/write_html_image_list.py,sha256=myXMdOwUERZWp9p2RPu8TcStCsu2X7aJNtcomlhoeqA,7573
70
- api/synchronous/api_core/animal_detection_api/md_visualization/visualization_utils.py,sha256=Up8hfM_KYyToIUhTv3sSrXGoYl8Hm57NO5t5AHMW3tk,31680
71
- api/synchronous/api_core/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
72
- api/synchronous/api_core/tests/load_test.py,sha256=bxyk3Oufl0V79vRsCPeRtWlE2o2KRtVgiqs7TSyP-iU,3277
73
- classification/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
74
- classification/aggregate_classifier_probs.py,sha256=gj6PBCe12Z05r3FbOHXuNJHPWyIogoQJvt4kFzApOqg,3429
75
- classification/analyze_failed_images.py,sha256=FTpARQmTUE3Nr9sZqvYNWX66H3Syf7xUzhe5wTRXFIE,8413
76
- classification/cache_batchapi_outputs.py,sha256=F_5EBCD9NM_nh8L794SupOL2DYO927M7LTnIS22xNBg,6297
77
- classification/create_classification_dataset.py,sha256=rvQICS62_UC_xJ9VBflFd57_Sz2ML9N0hW9Zg6fZH6Y,25454
78
- classification/crop_detections.py,sha256=LkGMr9R3ScV1xmjl1Ouynmsia5qxUo3HLTBYEV4D70Q,20427
79
- classification/csv_to_json.py,sha256=hXxUqM92e9AtZVk_BkkjHNi2gMkXHpwmDnYv_uplLxA,5889
80
- classification/detect_and_crop.py,sha256=_vh1vsQMGmiqKrs31zmInw2LJB0VqERZDZO1k5BAZ-I,36970
81
- classification/evaluate_model.py,sha256=luKwrz6Qdj1MWuVJuHl0MVDpTnsCZ4ooS97cBBHuqro,19307
82
- classification/identify_mislabeled_candidates.py,sha256=zOWHmWeaiOpM9c0s1uHOKgxJSHyJJR-oAM4R6f1c7T0,5032
83
- classification/json_to_azcopy_list.py,sha256=fDofugJtfMI1cy7KsVbfUHuPnis4BTKkcjxP3qgOzkU,1647
84
- classification/json_validator.py,sha256=STjUCHacJiOT0AmgFiOJlUpyx2EltYQvOeI9SRl1q6M,26492
85
- classification/map_classification_categories.py,sha256=Z7QYRvg1fSMA2RvQS2SbURmEmhqJ4QC3CpjKr2oCx4o,10666
86
- classification/merge_classification_detection_output.py,sha256=SZr2bMAcXKsorkJz40F4XEQJgtMVQBZqgFr0TTGtPL8,20011
87
- classification/prepare_classification_script.py,sha256=zE8j3wi8YJBkEnuqkIb-SK8xoEnAu-XtlkSiO8-zpdQ,6510
88
- classification/prepare_classification_script_mc.py,sha256=zQV6Vlr0cQxPrFLNk33RlPKAFPA4VuhlHsz-FtAIWv4,7190
89
- classification/run_classifier.py,sha256=shZD8D-BrofH7wNS524XDI-CHegjVpLZ9cNno0f3ke8,9325
90
- classification/save_mislabeled.py,sha256=gNcMK7zVo-Q4XChiB-zVJMcwE6uDz6r4EgQA0KaE5sI,3408
91
- classification/train_classifier.py,sha256=QBZHnydFJNgdjWKOyuP5r_yNhAkBHtHRHs4TmCpl8oo,32300
92
- classification/train_classifier_tf.py,sha256=84jxAJAuKgGphdHIFsRmCSmaZKrPGuG_5H-pYtk-q0I,28067
93
- classification/train_utils.py,sha256=LIEhLpIQrFAyM658PJSw2MyGvvMZyCzsDdz22v47_oU,11332
94
- classification/efficientnet/__init__.py,sha256=e-jfknjzCc5a0CSW-TaZ2vi0SPU1OMIsayoz2s94QAo,182
95
- classification/efficientnet/model.py,sha256=qJHWV9-rYKa4E_TIee5N_OjRhqDdM-icPpoMap3Q5HM,17040
96
- classification/efficientnet/utils.py,sha256=TF5S2cn2lvlCO2dFhdFPdzjbBBs-SyZGZmEx_dsJMbo,24846
97
- data_management/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
98
- data_management/camtrap_dp_to_coco.py,sha256=D6zGXQN84IM5PTWjWc0kFpFcwa47IfQruwiEcongKpc,8592
99
- data_management/cct_json_utils.py,sha256=dGf3zgFuJFunPDN0n-34Z0ogBwhZ_TeObdMGxRcQEBI,14783
100
- data_management/cct_to_md.py,sha256=37dYR6tac41fvEWLlmSNytv7og04TmVgGyZ1w1lql5k,5060
101
- data_management/cct_to_wi.py,sha256=hnFErIlBDmhZtBv21kDW14MSdHlUjwtCGn2vnG-cN34,9771
102
- data_management/coco_to_labelme.py,sha256=-ItUxFTMPTYoYymbDuEAnsUFQvWZueYst1BT2sg3cwI,8304
103
- data_management/coco_to_yolo.py,sha256=pywjKua5ua4BqyZ8PvmbbbNAi48eDYRzOxZznpdyx0c,28111
104
- data_management/generate_crops_from_cct.py,sha256=Esq2Vlvp1AQvD8bmtC15OvoTZTHASBfcIVIuisxXT08,4383
105
- data_management/get_image_sizes.py,sha256=uOI1wp5kmEGB7gLeDPkKodFALyE69DKPSo5N7ZH_8j4,6581
106
- data_management/labelme_to_coco.py,sha256=F-guvKoRBbsZlYNcRUZb1oiqzm0M58zKZq-QT8hg9oc,21179
107
- data_management/labelme_to_yolo.py,sha256=2qXFNSa-Lh7X3tqoL8Nu8XvVPG5ugPcUyDmCjCOV4eM,10024
108
- data_management/ocr_tools.py,sha256=CaZ1LoIUZ33sqiKPrRFQkvmV61qhkQWfr1WBEx8oGHo,32502
109
- data_management/read_exif.py,sha256=rFgaiAeCtmIDh6jTFXmVXeqPV3lIfTAohZQ5fjv7ZUU,22745
110
- data_management/remap_coco_categories.py,sha256=p0QTA_SzVjcNMAqDDR4grC_Y4CzhSFo1mQ9C9Sdj5_w,2902
111
- data_management/remove_exif.py,sha256=ybaZaO8pf0W1c_qE1krFh-MN4z40u5W0j5UhGxH8Uzw,1665
112
- data_management/resize_coco_dataset.py,sha256=ZvgIb6ODZeWaqig4FgxITTzD17NvyFbJ-JLaWbF7Sb4,6770
113
- data_management/wi_download_csv_to_coco.py,sha256=GqUKxRlgSt_r2k4QwpT5xTw-aN1huKGrzs_bK02yq8Q,8307
114
- data_management/yolo_output_to_md_output.py,sha256=2jofSf-qwBQ2qEl5pVn6NuYqnbiMl5Pgfj4vxGuIaVU,17261
115
- data_management/yolo_to_coco.py,sha256=BcUF5AFnKxw1xbeTSLDweZkTVxHqzpUPtZwPQhC6mPE,25080
116
- data_management/annotations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
117
- data_management/annotations/annotation_constants.py,sha256=1597MpAr_HdidIHoDFj4RgUO3K5e2Xm2bGafGeonR2k,953
118
- data_management/databases/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
119
- data_management/databases/add_width_and_height_to_db.py,sha256=X7A_iniGwlkhZ0jUNm564GT_mH2_RJGLD0aGP9cBhY0,749
120
- data_management/databases/combine_coco_camera_traps_files.py,sha256=oeELrMgxhsJ6aNBxPQyu4CmsdtYnzS5GKZEV8U-XUdk,6693
121
- data_management/databases/integrity_check_json_db.py,sha256=fK6Dta97zrE0A4f_DgMXs-hNa4zutfiMK0lkO3-mqwI,16285
122
- data_management/databases/subset_json_db.py,sha256=JK71qSUpUZe7cJquyt2xEzirDoZq1Lrr2X0cgtHKBpA,3219
123
- data_management/importers/add_nacti_sizes.py,sha256=jjGTpd36g5w7nLIeOatXRwu1Uti2GiGgP3-61QSg8oA,1156
124
- data_management/importers/add_timestamps_to_icct.py,sha256=5l1TkWq3X4Mxed7zlZ07U1RQcjbzBnwcoftNiaruigM,2364
125
- data_management/importers/animl_results_to_md_results.py,sha256=duvQkfFzONYHdTsJrhHyufpamK55r41IjkjFuPY7WmE,4698
126
- data_management/importers/auckland_doc_test_to_json.py,sha256=hk_2xk2s8anIuV9qXW22W5ATequhKn3KrZ1GheJDStI,12893
127
- data_management/importers/auckland_doc_to_json.py,sha256=5al9rv7ToqZPhxOpYV1u04o0BfR6Jt5R6_7X9DTwXk8,5936
128
- data_management/importers/awc_to_json.py,sha256=vQyOZ3pIn5wUm15z_Wztb4TL2ABnorWXNEh7XDMg_gM,5292
129
- data_management/importers/bellevue_to_json.py,sha256=sDLSs-tCcUuQqWdrqDQHMvnRFSlRtl7O-BX-yQChumU,7886
130
- data_management/importers/cacophony-thermal-importer.py,sha256=cFASISGm5micxF7yWPAu5-MueoUga5UXNSfNfQ0fxZE,28600
131
- data_management/importers/carrizo_shrubfree_2018.py,sha256=JG_LTniiJNVf2eswEXJYkfmFW9RjL-UTF25aVMqd_64,7811
132
- data_management/importers/carrizo_trail_cam_2017.py,sha256=BiJyim4nygtQBd7LUM9m9TJ-jydF8imhE1SnavTGXTc,8814
133
- data_management/importers/cct_field_adjustments.py,sha256=ZeNahKbtqFkkWuxq6ujuw8FD53IvGgp5Z9kX0lzAQqM,1334
134
- data_management/importers/channel_islands_to_cct.py,sha256=MKp2R07zpcQqkV5Jq1ZgyMeCsFfOr7gzY95HPNK4v5A,29465
135
- data_management/importers/ena24_to_json.py,sha256=9l9SYByrPv4UEewn-CxJYo95jcEVtxW1DVmCj-g10p4,8233
136
- data_management/importers/filenames_to_json.py,sha256=OlBdL2nV8HALSCGKBPOptl0lu4d-3fBGM5W1QvWbp2k,10510
137
- data_management/importers/helena_to_cct.py,sha256=KBWy1Qwji-eVWRbL5wtTbASVExwHMjUuVHD1HG0arLk,8686
138
- data_management/importers/idaho-camera-traps.py,sha256=pHxWxj_dJi4B680EbAyZFKweeM_h6mkOxG8iPsuEayA,54043
139
- data_management/importers/idfg_iwildcam_lila_prep.py,sha256=Anobf7sBYAqfdFu9aDxdMpRr9sXVIIsiB6qM0d2UAPs,8148
140
- data_management/importers/jb_csv_to_json.py,sha256=ZoOVAJy2StqT329E5W6pF0CecBo1yy2tYzsbrHPZQfQ,3713
141
- data_management/importers/mcgill_to_json.py,sha256=dfSxU1hHimyGT6Zt64XFrW63GWGsdKpqRrp5PE--xUw,6702
142
- data_management/importers/missouri_to_json.py,sha256=dw5G-6Y2czLMZ_aXoFtP44zj9YfCVeaDcV0o_0wiiog,14814
143
- data_management/importers/nacti_fieldname_adjustments.py,sha256=1oDCSuFXhc2b7JPIzkSb3DkusacdAjMM2GQZnhfFQCg,2027
144
- data_management/importers/noaa_seals_2019.py,sha256=7-oyLcBuYsVtGkuiRbMKb-czXmNZbZFQPRa9Yb97oEw,5132
145
- data_management/importers/pc_to_json.py,sha256=VF_1WjVQKMORGJR-qTbXurmZK_QoO82ABTqKIXzQp_o,10703
146
- data_management/importers/plot_wni_giraffes.py,sha256=KdEjbItDOXbXj0fr0celfMp7z31Rr3S29SLWBCMY-4M,3772
147
- data_management/importers/prepare-noaa-fish-data-for-lila.py,sha256=nCU2p35OCKlndC5TQRil15UxN0zm_yzsroHlMvx76Jk,12402
148
- data_management/importers/prepare_zsl_imerit.py,sha256=R6XI3McQRoy1KU6mSdV0kBZeieKF1jQNgigIOWzAirM,3739
149
- data_management/importers/rspb_to_json.py,sha256=ooB3ES7TOtPCXRWh4xCBZC18qhFpIuOU5u_RTHtPYPw,9818
150
- data_management/importers/save_the_elephants_survey_A.py,sha256=g63gXrb2ysfp7LY78-ZbOtly8TMPGNwreDL9erL0BeQ,10623
151
- data_management/importers/save_the_elephants_survey_B.py,sha256=FEs7_SFAdRjv-R5APb_2EOUL0rJg1qinwZV1Mea6tqc,11152
152
- data_management/importers/snapshot_safari_importer.py,sha256=4zfnzw8WXNY_g5qQRrkpdyjV-plTLxdMr5DOrRs4Gss,23557
153
- data_management/importers/snapshot_safari_importer_reprise.py,sha256=NjE_E8R2sqE-OSxS2RjR5Vf-hcDTnDB2DXWSOWMbvp0,22313
154
- data_management/importers/snapshot_serengeti_lila.py,sha256=iYX6_RicIfHk1jN894WlDXKn-BQqZfohKB6iyQL3lCs,33832
155
- data_management/importers/sulross_get_exif.py,sha256=Bt1tGYtr5CllxCe2BL8uI3SfPu3e1SSqijnOz--iRqQ,2071
156
- data_management/importers/timelapse_csv_set_to_json.py,sha256=RN8kTzrppxfE2LOra0xCyU2wE2sJnHOa8iX2LWbmFyo,15883
157
- data_management/importers/ubc_to_json.py,sha256=1J2du7r5ldZv7mIv90ffU0jOFw0t6R5fMoIw_pxnQBA,14848
158
- data_management/importers/umn_to_json.py,sha256=GLYL0cZpwcKmKqbH6gQ_3O_J9EBIw-mgI3F8Bxs83Lk,16162
159
- data_management/importers/wellington_to_json.py,sha256=sEUMACMd3caf8l4u595C7JFmPqEijN9HM6L8MVJEN7w,7655
160
- data_management/importers/wi_to_json.py,sha256=DCtdejdd5B17XFj_YtpWAQijBAb_P_Y7Ged0ViOw5jU,13639
161
- data_management/importers/zamba_results_to_md_results.py,sha256=L0E_zwPyN8Lvn1ukOw95TQ-APM7fBki_2_eKJhC3HkE,5381
162
- data_management/importers/eMammal/copy_and_unzip_emammal.py,sha256=CoP8rZOuLDIIL5jajB4WLnMhum19Ol-UT4W25FiF3zE,6085
163
- data_management/importers/eMammal/eMammal_helpers.py,sha256=Sv6PBAMDdlgwiek6Q3R6Rjio2RjtA-JpfgBr_Fmr9kA,6838
164
- data_management/importers/eMammal/make_eMammal_json.py,sha256=6C_-6Qk-Xhz_87DEPHA-txw90AvXrybJy1PbQXQbqwo,6987
165
- data_management/importers/snapshotserengeti/make_full_SS_json.py,sha256=khE3W0pO3Uq-UCfrLW_rpzWqjLll2JoBc360XeAuUGc,4126
166
- data_management/importers/snapshotserengeti/make_per_season_SS_json.py,sha256=sAwvcR2siwblgY3LfTsbH4mXOXvJZCA246QIsQWuQBA,4316
167
- data_management/lila/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
168
- data_management/lila/add_locations_to_island_camera_traps.py,sha256=-UDgwOshVMPkfw90vukVVaAaV6yUNnjzUBts3N9t6bw,2540
169
- data_management/lila/add_locations_to_nacti.py,sha256=S4ty7lARf2O13_GWTX1pFYyixPCNecqUj6jpO3hOV2w,4849
170
- data_management/lila/create_lila_blank_set.py,sha256=X-trivZL_yN-Ka9MJMhXXUQ_CHBAcOiNMGdKetHMY0Y,19736
171
- data_management/lila/create_lila_test_set.py,sha256=lzswPzKg71H3yl76KBBDcpm5Tx796He-gl-gynlGxWs,4806
172
- data_management/lila/create_links_to_md_results_files.py,sha256=awhnu1n4zmn6sPbikxCtMEncWMSnoHbG5_gF4_UZvvI,3793
173
- data_management/lila/download_lila_subset.py,sha256=VJ65yVH6ejBW_99UxTy3BQ0ES4KKXIB17u8HIeRslb0,5293
174
- data_management/lila/generate_lila_per_image_labels.py,sha256=ZaudY_c561A6FZ6BEKeSC2xehnV_wdfxqG-b8bzKpzA,18016
175
- data_management/lila/get_lila_annotation_counts.py,sha256=ZnMRkbY95Dh59sd0rUWUKedmnLH1mWAYib61YMEavIM,5588
176
- data_management/lila/get_lila_image_counts.py,sha256=m8zEOPA2aogq1oQAv8hsjsf_vvgyq2PKSHwkbQg2Pvs,3601
177
- data_management/lila/lila_common.py,sha256=yLi82UJOD_JCH09QyW-lAmZHLY6WsHJf6KRP0WyHyJM,10091
178
- data_management/lila/test_lila_metadata_urls.py,sha256=sv_G5Zym66nit4bN6L0-6m9jGniBNJDWcFfkmLHRnq0,4415
179
- detection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
180
- detection/process_video.py,sha256=Ufytlok5CrUz7R3XFyVNsWUmbxuChd3nRwMMiLrNsA4,29829
181
- detection/pytorch_detector.py,sha256=0bBaxv1LFNwgyr1H8bOO9F5A6M6FncT9y5erclFfC4c,12537
182
- detection/run_detector.py,sha256=XgBbx4acIv433LJinY7EypPs8r5fKKB47pplapNhAd4,29687
183
- detection/run_detector_batch.py,sha256=RF2hZzB6XyGWksiE3ySEUcEfrhH2DI9Hx97LShRPatI,52059
184
- detection/run_inference_with_yolov5_val.py,sha256=AGeZb6Arez9wjDEMwYZCxmoJrO1yd_dHvBFoPOalGTg,36888
185
- detection/run_tiled_inference.py,sha256=ldD4_m_2OH6ztQDBKFfgVkJVZb_hhVd1X4Lix_Yzn8U,37834
186
- detection/tf_detector.py,sha256=9O8anTr4jVD9JG8Zu-Y62Mx6mzjmSD-qy9avw0bYC4Y,7533
187
- detection/video_utils.py,sha256=oSWCUQW5NiienmaMM3PLULVmMyepJQ4uQh0xJQsiEy8,22753
188
- detection/detector_training/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
189
- detection/detector_training/model_main_tf2.py,sha256=YwNsZ7hkIFaEuwKU0rHG_VyqiR_0E01BbdlD0Yx4Smo,4936
190
- docs/source/conf.py,sha256=Lm1wiIKbbj0Ni_H8gw1SlaWF85vq01MqMHyFTYexqks,1158
191
- md_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
192
- md_utils/azure_utils.py,sha256=mC8wjw6gt3euCItcdCp_M4zUK97Up8WZIoLI51ALMoc,6223
193
- md_utils/ct_utils.py,sha256=mppmjTtRNGgnp0IBoXUPy5uNAanxpgPteVW5ACUi3vg,17847
194
- md_utils/directory_listing.py,sha256=sh5f6xkt_ERLBLZJ7NkEI37xSdPV65wOFH5vxlX6HfI,9658
195
- md_utils/md_tests.py,sha256=1rO_INtnOs5i-Jgq_pLXwNc4pBb4jUJZb3f9_0IsxEo,35870
196
- md_utils/path_utils.py,sha256=kVkz70tZM2RpNpuquqFCydL6ca5n3Grwh0Un2lHpXCA,35948
197
- md_utils/process_utils.py,sha256=uNzbijLk4lRqj2uU9zlUN8VuDeM4J7aLR2eb2O2-9ys,5226
198
- md_utils/sas_blob_utils.py,sha256=k76EcMmJc_otrEHcfV2fxAC6fNhxU88FxM3ddSYrsKU,16917
199
- md_utils/split_locations_into_train_val.py,sha256=4p9W6OvOB9q_KQqo01yLey8O3ZCvUxDqWCLUPLrmn-I,10091
200
- md_utils/string_utils.py,sha256=ZQapJodzvTDyQhjZgMoMl3-9bqnKAUlORpws8Db9AkA,2050
201
- md_utils/url_utils.py,sha256=uJRsSMxA1zMd997dX3V3wqFnKMTcSiOaE_atXUTRRVI,11476
202
- md_utils/write_html_image_list.py,sha256=qfNy9NZlQsIZsXOPONueAoCWg7owuayi21lPoG4EJ3A,8628
203
- md_visualization/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
204
- md_visualization/plot_utils.py,sha256=lOfU3uPrcuHZagV_1SN8erT8PujIepocgw6KZ17Ej6c,10671
205
- md_visualization/render_images_with_thumbnails.py,sha256=ci7EDeX_s5BEJG9tqg91-vdK1n_jMr5Eqws0WEO6HGY,10559
206
- md_visualization/visualization_utils.py,sha256=1YXDKbnFw5LZSyGulneThIyxHMnOgbG2lR8E4ExfXNY,62096
207
- md_visualization/visualize_db.py,sha256=jh1-SD3f5lS2VmSeCUltEnZ7JTu1iJ0y7KJlk_2Bp6s,20761
208
- md_visualization/visualize_detector_output.py,sha256=D9IpUJAqm0BbMXxltBsT1Qk-ztPttqls-N2V3W44MUk,17043
209
- taxonomy_mapping/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
210
- taxonomy_mapping/map_lila_taxonomy_to_wi_taxonomy.py,sha256=l-LPwGgc1x63GZFHO1a-r8iyixp_ypXfGsMXsrJdjag,17914
211
- taxonomy_mapping/map_new_lila_datasets.py,sha256=y1DCHCax0Q52EBbaMHPIO-_VoHjqfBoQYaSQYuNHC6M,4151
212
- taxonomy_mapping/prepare_lila_taxonomy_release.py,sha256=N9TUgg3_2u4hc5OBRydvEpweC3RIJ9ry5bXoi1BXLAY,4676
213
- taxonomy_mapping/preview_lila_taxonomy.py,sha256=PMZZyqCDMl9gDkQ-o2dTASDE0NjRgk4pIMK3k9hbEu4,19532
214
- taxonomy_mapping/retrieve_sample_image.py,sha256=skSCcSq5Rbq_y9tnM1kn5pBhQpA9zLDtrWe9lValA0I,1966
215
- taxonomy_mapping/simple_image_download.py,sha256=JNmlDELXy_LE2sXB5iSSgAhTD-oDkUHeoBxEda1Inaw,6851
216
- taxonomy_mapping/species_lookup.py,sha256=EhthWvgof9UoJ6D6IF67KqZJM6QoES7x5IgDd63jyl8,28281
217
- taxonomy_mapping/taxonomy_csv_checker.py,sha256=NqXDeIaKzqH3N_QSdq_iqY8rpms2rhWQ3xSRg3FjpjY,4837
218
- taxonomy_mapping/taxonomy_graph.py,sha256=ayrTFseVaIMbtMXhnjWCkZdxI5SAVe_BUtnanGewQpU,12263
219
- taxonomy_mapping/validate_lila_category_mappings.py,sha256=x9khTzRpGWRHSXd9xKUvP4J_DhKb4PyJNpIYkPIyR98,2514
220
- megadetector-5.0.9.dist-info/LICENSE,sha256=RMa3qq-7Cyk7DdtqRj_bP1oInGFgjyHn9-PZ3PcrqIs,1100
221
- megadetector-5.0.9.dist-info/METADATA,sha256=nBK4dK2cgAhM2eRdo02fHf3GaBx40qTwyoQxPWh3zTM,7663
222
- megadetector-5.0.9.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
223
- megadetector-5.0.9.dist-info/top_level.txt,sha256=8BMNtrwjqnFskOZ5xcDxwjhFBpi264HqnGtzY7Tcaqg,93
224
- megadetector-5.0.9.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- api
2
- classification
3
- data_management
4
- detection
5
- docs
6
- md_utils
7
- md_visualization
8
- taxonomy_mapping
File without changes