thtrieu / darkflow

Translate darknet to tensorflow. Load trained weights, retrain/fine-tune using tensorflow, export constant graph def to mobile devices
GNU General Public License v3.0
6.13k stars 2.08k forks source link

AssertionError: expect 63123056 bytes, found 63471556 #1076

Open absognety opened 5 years ago

absognety commented 5 years ago

Hi All, Apologize if this is duplicated issue but I couldn't find exact solution to my problem. I have checked with all the available .cfg and .weights files combinations for training darkflow on around 44 images.

I am trying to train the yolo using following:

python flow --model cfg/tiny-yolo-custom.cfg --load weights/tiny-yolo-voc-custom.weights --train --annotation train/darkflow_annotations --dataset train/images

At first the error mentioned above came and then I changed self.offset = 16 + difference(63123056,63471556) in loader.py, and then training started successfully,

what I am looking for is the way to correctly test the trained TfNet on test set - how to do the prediction part? Because I was using the different set of cfg and weights files before , the difference between expected and found values is far higher than what is mentioned here. I resolved the issue by changing the offset value like now, but when I tried to do the prediction I am getting an empty list.

Following is used for predict from command line:

python3 flow --model cfg/yolo-new.cfg \
    --imgdir <path_to_imgs> \
    --load -1 \
    --labels labels.txt \

the default directory out is being created with test images but with no bounding boxes.

**BTW I am doing all this windows.