Giter VIP home page Giter VIP logo

tracknet's Introduction

TrackNet

Heatmap based high speed tiny sport objects tracking based on TrackNet

TrackNet

Usage

Installation

pip install -r requirements.txt

Inference

# video file with output
cd Code_Baddy
python predict_video.py  --save_weights_path=weights/model_baddy.h5 --input_video_path=path_to_file.mp4 --output_video_path="tracked.mp4" --n_classes=256

Labeling Tool: Make your own dataset

See the readme file in the LabelingTool directory

Training

  1. Use the TrackNet_Python.ipynb to create heatmap as Ground Truth, and save heatmap as JPG file. (First Cell)

  2. Create the training and testing csv files (Second cell) Change the folder path to your custom paths for 1. and 2.

  3. Copy the training.csv and testing.csv file to Code_Baddy/Code_Custom folder

  4. After have training images and ground truth, we can start to train the TrackNet model II (Three frame Input)

    • Open command line
    • Change directory to Code_Baddy/Code_Custom
    • Using following command as example, you may need to change the command:
# Train with custom dataset
python train.py --save_weights_path=weights/model.h5 --training_images_name="training.csv" --epochs=500 --n_classes=256 --  input_height=360 --input_width=640 --load_weights=2 --step_per_epochs=200 --batch_size=2
* Trained model weight will be save in weights/model.h5

* Detailed explanation
		--save_weights_path: Save the weight path
		--training_images_name: Training images csv file path, training.csv
		--epochs: Epochs be set as 500 in this work
		--n_classes: Last layer classes, since the output value of TrackNet is between 0-255, the last layer depth be set as 256 
		--input_height: Input height be resize as 360 in this work
		--input_width: Input width be resize as 640 in this work
		--load_weights: If you want to retrain the weights from previous weight, give the number of weight in weights/model. If not, delete it.
		--step_per_epochs: Step per Epochs be set as 200 in this work
		-batch_size: Batch size be set as 2 in this work

References

GitHub : TrackNet

Paper : TrackNet: A Deep Learning Network for Tracking High-speed and Tiny Objects in Sports Applications

tracknet's People

Contributors

rswain1486 avatar weekenddeeplearning 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.