This is a computer vision project design to identify the species of fish from the images provided to it.
Fish Species Classification's architecture consists of YOLOv3 for fish detection and smaller VGGNet
for their species classification. Most part of the code are copied and modified from Anton Muehlemann (2019) and
Adrian Rosebrock (2016)for the YOLOv3 and VGGNet respectively.
In this Readme file I will walk you through to head start the project.
General idea of the project looks like this.
You need to download some basic prerequisites to run this project.
- Git clone FishSpeciesClassification project in your workstation
Run this command in your terminal.
git clone https://github.com/Dipesh8Bhatta/FishSpeciesClassification.git
- Install Python 3 +
- Install all the packages in the requirement file.
FishSpeciesClassification >> requirements.txt
After prerequisite installation, we need to download the pre-trained weights. There is a directory called Data, inside there is another directory called Model_Weights. Here, you need to add weights for YOLOv3 and smaller VGGNet which are trained on under two different sizes of dataset.
- Category 1
- YOLOv3 weight trained on 110 annotated fish images.
- Smaller VGGNet trained on 4 classes of fish.
- Category 2
- YOLOv3 weight trained on 1000 annotated fish images.
- Smaller VGGNet trained on 20 classes of fish.
Gather images, you want to use for classification. To identify fish species in those images, you can either put them into the location Data >> Source_Images >> Test_Images or you can directly provide the path while running the command line for execution.
You are ready run this program. Run this command in your terminal.
Python main_controller.py 'image_path'
Or just use this command if you have already stored the images in Data >> Source_Images >> Test_Images.
Python main_controller.py
Now, you will see the result in a pop window, showing information about the classified fish image. You can hover your
cursor in the pop up window and press any key to view next result.
References:
- Anton Muehlemann, 2019, TrainYourOwnYOLO, Github.com, retrieved 1 May 2020 <https://github.com/AntonMu/TrainYourOwnYOLO>
- Adrian Rosebrock, 2016, Keras and Convolutional Neural Networks (CNNs), Pyimagesearch, retrieved 7 April 2020 <https://www.pyimagesearch.com>