Open hakS07 opened 5 years ago
Have you changed filters in the last convolutional layer to num * (classes + 5)
, in your case 50? The reason I ask is because that AssertionError is usually a result of missing that.
@skofot thnkx for your reply it's really helpful. But now i got again this error
AssertionError: expect 44948596 bytes, found 44948600
However i changed the self.offset to 20 in the file loader.py and the input size to 32 in the file .cfg but nothing change
Are you using the original settings (offset and input size) now that the "filters"-option is correct? If not, try it out.
As to your original issue of not getting any output: I noticed that yolov2-tiny is originally trained for 80 classes while you're using 5. I tried reproducing your errors using tiny-yolo-voc and got very mixed results when reducing the number of classes. With 20 classes, which is the original amount, there were no problems. When reducing to 10 not a single object was found, and when reducing to only 1 hundreds of false positives were detected on each image.
Now I barely have any experience using pre-trained weights but my suggestion is to either: A) Find the labels for yolov2-tiny and try with the original 80 classes. or B) Try using tiny-yolo-voc instead, labels here, cfg here and weights here.
@skofot
thnx for your reply
now i'm using the original settings
classes=80
filtres= 425
size=416
self.offset=16
yolov2-tiny.cgf and .weights
igot this error AssertionError: expect 44948596 bytes, found 44948600
i try to change the offset to 20 but nothing change
I just tried follow the guide you linked and got the same error. If you can't solve it the only solution I have for you is to change model to tiny-yolo-voc (everything linked above) instead of yolov2-tiny and run
python flow --model cfg/tiny-yolo-voc.cfg --load bin/tiny-yolo-voc.weights --imgdir sample_img
@AntonClaesson yes i did it but I got the same error
@skofot thank you
follow the procedure below. change the value of filter in the last convolution layer to 50 (if you are using 5 classes) change the value of offset in loader.py to Z Y=existing offset value X= 44948600 - 44179096 (X=found-expect) Z=X+Y
@aditya-3 thnx
I'm trying to flow this tuto https://modelzoo.co/model/yolo-tensorflow i did try 3 ways
2)i changed the self.offset from 16 to 20 to solve this pb https://sites.google.com/view/tensorflow-example-java-api/complete-guide-to-train-yolo/convert-darknet-weights-to-pb-file