Pytorch-yolov3: how to use .pth weight file and test my testset

Created on 27 May 2019  路  9Comments  路  Source: eriklindernoren/PyTorch-YOLOv3

After training data set of myself, in the "checkpoints" file generated ". Pyh "weight file, then what should I test my test set (in other words: what should I input command)

Most helpful comment

Update: This worked for me
python detect.py --model_def config/yolov3-custom.cfg --weights_path checkpoints/yolov3_ckpt_100.pth --image_folder data/samples/ --class_path data/custom/classes.names

All 9 comments

@liwanjie1020 Have you figured it out? I am having the same issue?

@sourav164
Have you figured it out? I am having the same issue too.

@kaikaizhu nope. This model was running for me but it was not detecting anything at all. Thus, I am using the tensorflow version of it.

also facing the same issue

it is written in detect.py, the command should be like this: python detect.py --image_folder data/images --checkpoint_model checkpoints/yolov3_ckpt_1.pth

When you train your own dataset, then you want to test it by checkpoint .pth file, it could be better to try:
python detect.py --image_folder data/samples/ --weights_path checkpoints/yolov3_ckpt_1.pth --model_def config/yolov3-custom.cfg

@NiubilityYang do you run the detect.py锛寃hen i run the detect.py,the dection is None,what's the problem?

Same problem, I tried to change the .pth -> .weights

But didn't help. I'm getting None result

Update: This worked for me
python detect.py --model_def config/yolov3-custom.cfg --weights_path checkpoints/yolov3_ckpt_100.pth --image_folder data/samples/ --class_path data/custom/classes.names

Was this page helpful?
0 / 5 - 0 ratings