PyTorch-YOLOv3 icon indicating copy to clipboard operation
PyTorch-YOLOv3 copied to clipboard

how to use .pth weight file and test my testset

Open liwanjie1020 opened this issue 6 years ago • 9 comments

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)

liwanjie1020 avatar May 27 '19 05:05 liwanjie1020

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

sourav164 avatar Jun 05 '19 19:06 sourav164

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

kaikaizhu avatar Jun 14 '19 01:06 kaikaizhu

@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.

sourav164 avatar Jun 14 '19 20:06 sourav164

also facing the same issue

NiubilityYang avatar Jul 02 '19 03:07 NiubilityYang

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

NiubilityYang avatar Jul 02 '19 07:07 NiubilityYang

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

HaochenW avatar Jul 11 '19 02:07 HaochenW

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

nanhui69 avatar Nov 11 '19 06:11 nanhui69

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

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

priteshgohil avatar Dec 03 '19 20:12 priteshgohil

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

priteshgohil avatar Dec 04 '19 10:12 priteshgohil