Replication of "Open Problems in Computer Vision for Wilderness SAR and The Search for Patricia Wu-Murad"
- Checkout the ai-hadr-iccv-2023 branch of this repository.
- Download the original imagery from the search here.
- Download the models referenced in the paper: Tiled_EffecientDET174 & Tiled_EffecientDET84
-
Extract frames from the videos that you want to analyze, and copy the raw images.
Since these models only consume images, instead of videos, you need to extract frames from the videos that we will run the models on. Specifically, you will need to generate frames of the video you want to analyze, and a mapping between the extracted frames and the original videos (so you can look up the video from the extracted imagery).
This can be done by calling
folder2frames.py
file inWiSAR/src/utils
. Here is an example call...cd WiSAR/src/utils/ python folder2frames.py --in_folder_path <PATH_TO_DOWNLOADED_WU_MURAD_DATASET> --out_id2path_path /WiSAR/out/id2path.csv --out_folder_path /WiSAR/out/extracted_frames --fps_sample_rate 2 #Note: There are further parameters that are specified in the script. #Note: --fps_sample_rate indicates the number of frames per second that should be sampled.
- Download the images from the Wu-Murad Dataset here
- Run Inference on these images by calling
RXInference.py
located atWiSAR/src/inference_scripts/
as followscd WiSAR/src/inference_scripts/ python RXInference.py --in_folder_path /WiSAR/out/extracted_frames --out_folder_path /WiSAR/out/ --id2path_file_path /WiSAR/out/id2path.csv
To Replicate the results of the Tiled_EffecientDET84 and Tiled_EffecientDET174 models on the Wu-Murad Dataset...
- Download the images from the Wu-Murad Dataset here
- Run Inference on these images by calling
EfficientDetTiledInference.py
located atWiSAR/src/inference_scripts/
as followscd WiSAR/src/inference_scripts/ python EfficientDetTiledInference.py --in_folder_path /WiSAR/out/extracted_frames --model_path /WiSAR/models/EfficientDet/HERIDAL/epoch=84-step=33490.ckpt --out_folder_path /WiSAR/out/ --id2path_file_path /WiSAR/out/id2path.csv python EfficientDetTiledInference.py --in_folder_path /WiSAR/out/extracted_frames --model_path /WiSAR/models/EfficientDet/HERIDAL/epoch=174-step=25725.ckpt --out_folder_path /WiSAR/out/ --id2path_file_path /WiSAR/out/id2path.csv #Note: If you encounter cuda out of memory errors, consider reducing the batch size using the --batch_size argument.
- Download the HERIDAL dataset from the publishing authors here.
- Convert the labels from the HERIDAL Dataset from XML to CSV using the
convert_heridal_xmls_to_csv.py
file inWiSAR/src/datasets/HERIDAL/
as follows.cd WiSAR/src/datasets/HERIDAL/ python convert_heridal_xmls_to_csv.py --image_folder_path <PATH_TO_HERIDAL_IMAGE_TEST_FOLDER> --label_folder_path <PATH_TO_HERIDAL_LABELS_TEST_FOLDER> --out_csv_path <PATH_TO_OUTPUT_CSV>
- To replicate the results on the HERIDAL dataset using the Tiled_EffecientDET84 model, perform inference on the HERIDAL dataset using the
EvaluateHERIDALTestSet.py
file located inWiSAR/src/inference_scripts/
as follows.cd WiSAR/src/inference_scripts/ python EvaluateHERIDALTestSet.py --in_folder_path <PATH_TO_HERIDAL_IMAGE_TEST_FOLDER> --in_labels_file_path <PATH_TO_HERIDAL_LABELS_CSV> --out_folder_path <PATH_TO_OUTPUT_PREDS_CSV> --model_path ../../models/EfficientDet/HERIDAL/epoch=84-step=33490.ckpt --tile_dim 512 --model_confidence_threshold 0.0 --union_overlapping_bboxes #Note: If you encounter cuda out of memory errors, consider reducing the batch size using the --batch_size argument.
- To replicate the results on the HERIDAL dataset using the Tiled_EffecientDET174 model, perform inference on the HERIDAL dataset using the
EvaluateHERIDALTestSet.py
file located inWiSAR/src/inference_scripts/
as follows.cd WiSAR/src/inference_scripts/ python EvaluateHERIDALTestSet.py --in_folder_path <PATH_TO_HERIDAL_IMAGE_TEST_FOLDER> --in_labels_file_path <PATH_TO_HERIDAL_LABELS_CSV> --out_folder_path <PATH_TO_OUTPUT_PREDS_CSV> --model_path ../../models/EfficientDet/HERIDAL/epoch=174-step=25725.ckpt --tile_dim 512 --model_confidence_threshold 0.0 --union_overlapping_bboxes #Note: If you encounter cuda out of memory errors, consider reducing the batch size using the --batch_size argument.
- With the predictions csv that was generated in either steps 4 or 5 above you can then compute the performance metrics using the
compute_bounding_box_metrics.py
file located inWiSAR/src/inference_scripts/
as follows.cd WiSAR/src/inference_scripts/ python compute_bounding_box_metrics.py --in_labels_file_path <PATH_TO_HERIDAL_LABELS_CSV> --in_preds_file_path <PATH_TO_HERIDAL_PREDS_CSV>