GithubHelp home page GithubHelp logo

adrian-cascales / fish_tracker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fjolnirr/fish_tracker

0.0 0.0 0.0 43.23 MB

Fish Detection, Tracking and Counting using YOLOv3 and DeepSORT

License: Apache License 2.0

Python 100.00%

fish_tracker's Introduction

Fish Detection, Tracking and Counting using YOLOv3 and DeepSORT

This repository implements YOLOv3 and DeepSORT for tracking and counting of 2 different fish species in an aquarium. YOLO(You only look once) uses CNN to detect objects in real time. A single neural network is applied to the full image by the algorithm and the image is divided into regions, predicts bounding boxes and the probabilities for each region. Then the predicted probabilities weight the bounding boxes. We can use these detections to feed DeepSORT(Simple Online and Realtime Tracking with a Deep Association Metric) in order to track the fish. Main purpose of this repository after tracking the fish, to store the fish movements in other word behaviors and to count the fish going one place to another.

Fish Tracking and Counting

You can check out the youtube video of the result on the link below:

Fish Tracking and Counting

How to apply?

I recommend building the tracker in an anaconda environment. So, download anaconda. Then open anaconda prompt as administrator. Go to your path(location of the unzipped tracker file). Create an environment named as tracker-gpu (if you do not have a gpu you can name it as tracker-cpu). And download the dependencies in the conda-gpu.yml file(or conda-cpu.yml). Activate the tracker-gpu environment.

conda env create -f conda-gpu.yml
conda activate tracker-gpu

The code below will convert the yolov3 weights into TensorFlow .tf model files. Make sure that your weights in the weights folder.

# yolov3-custom (add --tiny flag if your custom weights were trained for tiny model)
python load_weights.py --weights ./weights/<YOUR CUSTOM WEIGHTS FILE> --output ./weights/yolov3-custom.tf --num_classes <# CLASSES>

Enter the below lines to your anaconda prompt to be able run the fish tracker.

#yolov3-custom (add --tiny flag if your custom weights were trained for tiny model)
python object_tracker.py --video ./data/video/your_test_video.mp4 --output ./data/video/results.avi --weights ./weights/yolov3-custom.tf --num_classes <# CLASSES> --classes ./data/labels/<YOUR CUSTOM .names FILE>

I have not build a repository for training part of this project but you can check out theAIGuysCode youtube channel https://www.youtube.com/watch?v=10joRJt39Ns

References

DeepSORT Repository

YoloV3 Implemented in Tensorflow 2.0

theAIGuysCode- Great Tutorial for Object Tracking Implementation

fish_tracker's People

Contributors

fjolnirr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.