YOLOv5 implementation using TensorFlow 2
- Change
data_dir
,image_dir
,label_dir
andclass_dict
inconfig.py
- Choose version in
config.py
- Optional,
python main.py --anchor
to generate anchors for your dataset and change anchors inconfig.py
- Optional,
python main.py --record
to generate tf-record for your dataset - Run
python main.py --train
for training
- Run
python main.py --test
├── Dataset folder
├── images
├── 1111.jpg
├── 2222.jpg
├── labels
├── 1111.xml
├── 2222.xml
├── train.txt
├── test.txt
- xml file should be in PascalVOC format
train.txt
test.txt
contains image names without extension
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