Media-Smart / vedadet

A single stage object detection toolbox based on PyTorch
Apache License 2.0
498 stars 128 forks source link

Run from a pretrained model. #16

Closed abhisheksrinivasan2811 closed 3 years ago

abhisheksrinivasan2811 commented 3 years ago

Hey I'm getting this error when I try to run the tinaface.py file with the pretrained model.Can you help me out?

Traceback (most recent call last): File "tools/infer.py", line 93, in main() File "tools/infer.py", line 75, in main engine, data_pipeline, device = prepare(cfg) File "tools/infer.py", line 31, in prepare load_weights(engine.model, cfg.weights.filepath) File "/content/vedadet/configs/vedadet/vedacore/misc/checkpoint.py", line 238, in load_weights state_dict = _load_checkpoint(filepath, map_location) File "/content/vedadet/configs/vedadet/vedacore/misc/checkpoint.py", line 135, in _load_checkpoint raise IOError(f'{filepath} is not a file') OSError: your/weight/file/path is not a file

hxcai commented 3 years ago

@abhisheksrinivasan2811 Please modify the weights in config file

abhisheksrinivasan2811 commented 3 years ago

I uploaded the pretrained model given in the gDrive.

hxcai commented 3 years ago

@abhisheksrinivasan2811 Sorry, I don't understand what you mean uploading the pretrained model?

abhisheksrinivasan2811 commented 3 years ago

I meant.After modifying the config file.I'm getting this error.

hxcai commented 3 years ago

@abhisheksrinivasan2811 How do you run the inference?

abhisheksrinivasan2811 commented 3 years ago

CUDA_VISIBLE_DEVICES="0" python tools/infer.py configs/infer/retinanet/retinanet.py image_path.Replacing Tinanet.py here and the model path.

hxcai commented 3 years ago

@abhisheksrinivasan2811 Where you put the pretrained model file?