https://github.com/jahongir7174/yolov5-tf
YOLOv5 implementation using TensorFlow 2
https://github.com/jahongir7174/yolov5-tf
object-detection tensorflow tensorflow2 tf2 yolov5
Last synced: 2 months ago
JSON representation
YOLOv5 implementation using TensorFlow 2
- Host: GitHub
- URL: https://github.com/jahongir7174/yolov5-tf
- Owner: jahongir7174
- License: apache-2.0
- Created: 2020-10-14T12:37:56.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-28T01:46:26.000Z (over 4 years ago)
- Last Synced: 2025-07-26T00:43:37.598Z (3 months ago)
- Topics: object-detection, tensorflow, tensorflow2, tf2, yolov5
- Language: Python
- Homepage:
- Size: 14.6 KB
- Stars: 59
- Watchers: 2
- Forks: 25
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[YOLOv5](https://github.com/ultralytics/yolov5) implementation using TensorFlow 2
#### Train
* Change `data_dir`, `image_dir`, `label_dir` and `class_dict` in `config.py`
* Choose version in `config.py`
* Optional, `python main.py --anchor` to generate anchors for your dataset and change anchors in `config.py`
* Optional, `python main.py --record` to generate tf-record for your dataset
* Run `python main.py --train` for training#### Test
* Run `python main.py --test`#### Dataset structure
├── Dataset folder
├── images
├── 1111.jpg
├── 2222.jpg
├── labels
├── 1111.xml
├── 2222.xml
├── train.txt
├── test.txt
#### Note
* xml file should be in PascalVOC format
* `train.txt` `test.txt` contains image names without extension#### Recommendation (for docker users)
* `docker pull nvcr.io/nvidia/tensorflow:20.12-tf2-py3`
* `nvidia-docker run --gpus all -v /your/project/folder:/Projects -it nvcr.io/nvidia/tensorflow:20.12-tf2-py3`
* `cd ../Projects`
* `apt-get update`
* `apt-get install ffmpeg libsm6 libxext6 -y`
* `pip install opencv-python`#### Reference
* https://github.com/ultralytics/yolov5
* https://github.com/wizyoung/YOLOv3_TensorFlow