Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/LongxingTan/tfyolo
tfyolo: Efficient Implementation of Yolov5 in TensorFlow
https://github.com/LongxingTan/tfyolo
object-detection tensorflow yolov5 you-only-look-once
Last synced: 4 days ago
JSON representation
tfyolo: Efficient Implementation of Yolov5 in TensorFlow
- Host: GitHub
- URL: https://github.com/LongxingTan/tfyolo
- Owner: LongxingTan
- Created: 2020-12-30T06:05:23.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-03T05:57:16.000Z (7 months ago)
- Last Synced: 2024-10-05T16:05:34.561Z (about 1 month ago)
- Topics: object-detection, tensorflow, yolov5, you-only-look-once
- Language: Python
- Homepage:
- Size: 1.33 MB
- Stars: 229
- Watchers: 14
- Forks: 71
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Yolov5
[![LICENSE](https://img.shields.io/badge/license-Anti%20996-blue.svg)](https://github.com/996icu/996.ICU/blob/master/LICENSE)YoloV5 implemented by TensorFlow2 , with support for training, evaluation and inference.
> **NOT perfect** project currently, but I will continue to improve this, so you might want to watch/star this repo to revisit. Any contribution is highly welcomed
![demo](./data/sample/demo1.png)
## Key Features
- minimal Yolov5 by pure tensorflow2
- yaml file to configure the model
- custom data training
- mosaic data augmentation
- label encoding by iou or wh ratio of anchor
- positive sample augment
- multi-gpu training
- detailed code comments
- full of drawbacks with huge space to improve## Usage
### Clone and install requirements
```
$ git clone [email protected]:LongxingTan/Yolov5.git
$ cd Yolov5/
$ pip install -r requirements.txt
```### Download VOC
```
$ bash data/scripts/get_voc.sh
$ cd yolo
$ python dataset/prepare_data.py
```### Train
```
$ python train.py
```### Inference
```
$ python detect.py
$ python test.py
```### Train on custom data
If you want to train on custom dataset, PLEASE note the input data should like this:
```
image_dir/001.jpg x_min, y_min, x_max, y_max, class_id x_min2, y_min2, x_max2, y_max2, class_id2
```
And maybe new anchor need to be created, don't forget to change the nc(number classes) in yolo-yaml.
```
$ python dataset/create_anchor.py
```
## References and Further Reading
- [yolov5](https://github.com/ultralytics/yolov5)
- [PyTorch_YOLOv4](https://github.com/WongKinYiu/PyTorch_YOLOv4)
- [yolov3-tf2](https://github.com/zzh8829/yolov3-tf2)
- [tensorflow-yolov3](https://github.com/YunYang1994/tensorflow-yolov3)