Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you provide the right utils/datasets.py file? #28

Closed
hnuzhy opened this issue Dec 29, 2021 · 5 comments
Closed

Can you provide the right utils/datasets.py file? #28

hnuzhy opened this issue Dec 29, 2021 · 5 comments

Comments

@hnuzhy
Copy link

hnuzhy commented Dec 29, 2021

I got an error when running the train process.
assert nf > 0 or not augment, f'{prefix}No labels in {cache_path}. Can not train without labels. See {HELP_URL}'
It shows that the provided utils/datasets.py file seems wrong for not changing into loading keypoints json file. So, could you please provide the right utils/datasets.py file?

@wmcnally
Copy link
Owner

wmcnally commented Dec 29, 2021

Which training command are you running? If you're doing COCO training, did you download the coco dataset? If not, from the main project folder run sh data/scripts/get_coco_kp.sh

@hnuzhy
Copy link
Author

hnuzhy commented Dec 30, 2021

Thank you for your answer! I'm running the COCO training KAPAO-L. Below is my running script

python -m torch.distributed.launch --nproc_per_node 3 train.py --workers 15 --device 0,1,2 \
    --img 1280 --batch 48 --epochs 500 --data data/coco-kp.yaml --hyp data/hyps/hyp.kp-p6.yaml \
    --val-scales 1 --val-flips -1 --weights yolov5l6.pt --project runs/kapao --name train_coco2017_e500

Actually, I have downloaded and built my COCO dataset project. And I have also checked the script data/scripts/get_coco_kp.sh to find some config information that might be ignored by me. It actually did not change the annotations/labels of COCO keypoints. So I still got the same error when running the train process.

Until now, I have two questions:

  1. What's the meaning of kp_labels in data/coco-kp.yaml? I wrote the txt file kp_labels/train2017.txt with paths of training images. Am I right?
  2. Does the kapao rewrite the dataset processing script utils/datasets.py? It is originally designed for the dataloader of object detection task YOLOv5. And I did not find the loading and parsing scripts of COCO json keypoints person_keypoints_train2017.json and person_keypoints_val2017.json in the new utils/datasets.py file.

@hnuzhy hnuzhy closed this as completed Dec 30, 2021
@hnuzhy
Copy link
Author

hnuzhy commented Dec 30, 2021

Which training command are you running? If you're doing COCO training, did you download the coco dataset? If not, from the main project folder run sh data/scripts/get_coco_kp.sh

While, I have found the utils/labels.py file and run it to generate suitable COCO labels for kapao. Now, the training is running normally~ By the way, the totally epoch is set to 500 which is super large and time-consuming for my 3*3090GPUs (24GB/per). Should it be that large for KAPAO-L convergence?

@hnuzhy hnuzhy reopened this Dec 30, 2021
@wmcnally
Copy link
Owner

You could run for 300 epochs and get close to the same results.

@hnuzhy
Copy link
Author

hnuzhy commented Dec 30, 2021

You could run for 300 epochs and get close to the same results.

OK, thank you for your advice :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants