Skip to content

Latest commit

 

History

History
54 lines (31 loc) · 3.05 KB

DETAILS_README.md

File metadata and controls

54 lines (31 loc) · 3.05 KB

Counting Manatee Aggregations using Deep Neural Networks and Anisotropic Gaussian Kernel

Program Setup step by setp

Source Images

Source video

Save the Manatee provides on underwater and above water webcames for watching manatees as well as some video clips. You can download the video we used in this project from Blue Spring Manatee Webcam Highlights - Above Water (3) and you can also download the video from Google Drive

Generate images

Once the video has been downloaded, move it into the folder src/image_generator, run this script to generate images from the video

python extract_frames_moviepy.py $video_name$.mp4 (moviepy is required to run the script)

A folder named $video_name$-moviepy will be generated at the same folder and all the images will be placed in that folder.

Images samples generated from the video

Remove duplicated images

  • Extract images features

    go into src/drop_images folder and run
    python extract_features.py $your_image_folder$

    By running this command, for each of the image in the folder, its features are extracted from the image and saved into a .pickle file which has the same name with the image. These .pickle files are saved in the new folder of feature_data which is a subfolder where your run the command. (These files are bigger more than 100MB)

  • Calculate the distance of the images

    python feature_distance_calculations.py ${path_to}$/feature_data

    By running this command, it will calculate the distance among each of the images and the results are saved into a subfolder of the feature data folder, $path_to$/feature_data/distance_results/distance.pickle.

  • Choose images

    As all the distances among all the images have been calculated, a threshold value can be used to determine weather images should be kept or not.

    In our paper, the threshold value used to filter images is 2. In order to make sure all different models are using the same data to train in same stage, we saved the filter results into 5 training json files and 5 testing json files.

    // TODO. I lost the script for this step. However, I have uploaded the json files we used for this paper which should not block you to reprodue the results.

Labeling Work

In order to label the images, we employee the tool Crowd Counting Labeler and modified part of the code to support line labeling work.

The newly program is also attached in this project in the folder of /src/cclabeler_line. For the usage of this tool, please check their guidance from here s