Daniil-Osokin / lightweight-human-pose-estimation.pytorch

Fast and accurate human pose estimation in PyTorch. Contains implementation of "Real-time 2D Multi-Person Pose Estimation on CPU: Lightweight OpenPose" paper.
Apache License 2.0
2.08k stars 473 forks source link

How do I set the training parameters? #330

Open amYaniii opened 5 months ago

amYaniii commented 5 months ago

Hello author, I have just touched this task and tried to train my own dataset. How do you determine the training epochs I want to run in the train.py file? and According to the official guidelines, I seem to have run through the code, but why are all my indicators 0 during training, is it because I have too few training sessions? Here's the command for me to run train.py "python train.py --train-images-folder "F:\edgeai-yolov5-yolo-pose\sports\images\train2017" --prepared-train-labels F:\lightweight-human-pose-estimation.pytorch-master\prepared_train_annotation.pkl --val-labels F:\lightweight-human-pose-estimation.pytorch-master\val_subset.json --val-images-folder "F:\edgeai-yolov5-yolo-pose\sports\images\val2017" --from-mobilenet" I deleted this command"--checkpoint-path F:\lightweight-human-pose-estimation.pytorch-master\mobilenet_sgd_68.848.pth.tar",because it would give an error, but I didn't change the network image After removing this command, this will work through, but why are so many iterations being trained and the validation metric is 0? Is it because I didn't use pre-training weights? image

amYaniii commented 5 months ago

What is the relationship between the iterations in the train.py file and the training round epochs, how many epochs are generally trained, and how to set the iterations?

Daniil-Osokin commented 4 months ago

Hi! These are warnings, not errors, so model initialization seems to be ok. Usually 1 epoch = going through all samples in datasets. So usually number_of_iterations_per_epoch = number_of_samples_in_dataset / batch_size

amYaniii commented 1 month ago

This issue has been resolved, thanks for your reply.