YOLO_v3_tutorial_from_scratch icon indicating copy to clipboard operation
YOLO_v3_tutorial_from_scratch copied to clipboard

Different results using my own training model

Open zjcbatman opened this issue 6 years ago • 3 comments

Hi, @ayooshkathuria , recently, I have trained my own model on ImageNet2015 using the C source code from the official site. When I tested my model on the official C code using some images, I got some normal results which means my model has no problem. However, when I tested my model on your code, results were different and bad. I don't know why. I have already changed .cfg file, .weights file and the class name file. This is the result I got using the official C code: image But I would get no car if I run your code using my model. image

zjcbatman avatar Jun 01 '18 06:06 zjcbatman

I have some question. I have trained my own model on my own dataset using darknet and got a .weights file. When I want to change it to pytorch using this code,I got this problem: Traceback (most recent call last): File "video.py", line 57, in model.load_weights(args.weightsfile) File "C:\Users\LittleSunH\Desktop\YOLO_v3_tutorial_from_scratch-master\darknet.py", line 314, in load_weights conv_weights = conv_weights.view_as(conv.weight.data) RuntimeError: invalid argument 2: size '[256 x 128 x 3 x 3]' is invalid for input with 264248 elements at ..\aten\src\TH\THStorage.cpp:84

what should I do?

LittleSunH avatar Aug 01 '18 00:08 LittleSunH

I also have the same error as LittleSunH, but with the pre-trained weights:

File "darknet.py", line 309, in model.load_weights('yolov3.weights') File "darknet.py", line 293, in load_weights conv_weights = conv_weights.view_as(conv.weight.data) RuntimeError: invalid argument 2: size '[512 x 1024 x 1 x 1]' is invalid for input with 471805 elements at /pytorch/aten/src/TH/THStorage.cpp:84

matursi avatar Aug 03 '18 04:08 matursi

@LittleSunH @matursi I think #44 might give you some insights on what is happening. https://github.com/ayooshkathuria/YOLO_v3_tutorial_from_scratch/issues/44

juanmed avatar May 28 '19 07:05 juanmed