qqwweee / keras-yolo3

A Keras implementation of YOLOv3 (Tensorflow backend)
MIT License
7.14k stars 3.44k forks source link

Do I should match "weights_path" in train.py? #666

Open InseongHa opened 4 years ago

InseongHa commented 4 years ago

At the very top of 'train.py', there is

if is_tiny_version: model = create_tiny_model(input_shape, anchors, num_classes, freeze_body=2, weights_path='model_data/yolo_tiny.h5') at the parameters part, 'weights_path' is already selected. And the middle of 'train,py',

def create_tiny_model(input_shape, anchors, num_classes, load_pretrained=True, freeze_body=2, weights_path='model_data/yolo_tiny.h5'):

the 'weights_path' is fixed. Do I should match those paths same? or just don't mind for one of them?

I didn't know that there was a fixed path at the function 'create_tiny_model', so I modified first one only. The code is running now, but I'm worrying that it will make any errors.

1092366225 commented 4 years ago

You don't need to match them. Modifying the first one is enough and you did it right.

MohamedNazeem commented 4 years ago

i am facing an issue with this part since the mode_data folder does not have this yolo_tiny.h5 file the error is as it follows : OSError: Unable to open file (unable to open file: name = 'model_data/yolo_weights.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)

i think it a run time error as the complier reads this part before creating it .. any help ?

InseongHa commented 4 years ago

@MohamedNazeem I don't think your problem's about that path dupliaction. It seems like it just doesn't recognize your path for directory. I didn't get any problems with matching those paths.