项目作者: jahongir7174

项目描述 :
YOLOv5 implementation using TensorFlow 2
高级语言: Python
项目地址: git://github.com/jahongir7174/YOLOv5-tf.git
创建时间: 2020-10-14T12:37:56Z
项目社区:https://github.com/jahongir7174/YOLOv5-tf

开源协议:Apache License 2.0

下载


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

  1. ├── Dataset folder
  2. ├── images
  3. ├── 1111.jpg
  4. ├── 2222.jpg
  5. ├── labels
  6. ├── 1111.xml
  7. ├── 2222.xml
  8. ├── train.txt
  9. ├── 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