Shark detection and classification with machine learning, Jenrette et al., 2022
The Shark Detector is composed of an object-detection and image classification ensemble. For simple function and use, we developed the R package, sharkDetectorR. For increased customization, retraining, and increased processing speed, this repository offers the scripts and models to the public. Version 4.0.0 can classify 69 species of sharks with an average accuracy of 82%.
- Python 3.7 or higher
- CLONE the repository and create your Python environment
git clone https://github.com/sharkPulse/Shark-Detector.git
cd Shark-Detector
python -m venv shark_env
source .shark_env/bin/activate
pip install -r requirements.txt
- DOWNLOAD the file v4_hawaii.tar.gz from models (~4GB)
- EXTRACT and MOVE your models to your cloned repository
- Run the Shark Detector on a test video
python process_video.py
- Detection frames and annotations to
output/
- When prompted, enter the path to the video file you wish to process.
- The script will process the video and save the results to the
./output/<video_name>/
directory. - A CSV file with the results will also be saved to the
./output/
directory.
- Place all images to be processed in the
./images/
directory. - The script will process all images in this directory and move the processed images to the
./output/images/
directory. - A CSV file with the results will be saved to the
./output/
directory with the name formatimages_<current_time>_results.csv
.
- Ensure that the models and labels are in the correct paths as referenced in the scripts.
- If you encounter any issues with TensorFlow GPU setup, ensure your system has the correct CUDA and cuDNN versions installed. Refer to the TensorFlow GPU installation guide for detailed instructions.
- Data: jjeremy1@vt.edu