david8862 / keras-YOLOv3-model-set

end-to-end YOLOv4/v3/v2 object detection pipeline, implemented on tf.keras with different technologies
MIT License
639 stars 222 forks source link

YOLO Nano network file and pre-trained model #11

Open ardeal opened 4 years ago

ardeal commented 4 years ago

Hi,

Where could I download the YOLO Nano network file(similar with yolov3.cfg) and the pre-trained model?

Thanks.

david8862 commented 4 years ago

Hi,

Where could I download the YOLO Nano network file(similar with yolov3.cfg) and the pre-trained model?

Thanks.

Hi, I didn't create the darknet cfg file for YOLO Nano but implement it directly in yolo3_nano.py as a tf.keras model. The pretrained weight could be got from yolo3_nano_weights_416_voc.tar.gz

ardeal commented 4 years ago

Hi,

I am not familiar with Keras. is there an implementation of YOLO Nano on Pytorch?

david8862 commented 4 years ago

Hi,

I am not familiar with Keras. is there an implementation of YOLO Nano on Pytorch?

I saw a PyTorch version yolo_nano on github

ardeal commented 4 years ago

Hi, I am not familiar with Keras. is there an implementation of YOLO Nano on Pytorch?

I saw a PyTorch version yolo_nano on github

For that implementation, there is no pre-trained model. I am not sure whether that implementation is correct or not.

your network file is validated as you have pre-trained model.

david8862 commented 4 years ago

Hi, I am not familiar with Keras. is there an implementation of YOLO Nano on Pytorch?

I saw a PyTorch version yolo_nano on github

For that implementation, there is no pre-trained model. I am not sure whether that implementation is correct or not.

your network file is validated as you have pre-trained model.

If just want to know the YOLO Nano model structure, you can download & extract the pretrained weight and dump it out to an inference model file with model dump cmd. Then open model file with netron

ardeal commented 4 years ago

Hi, I am not familiar with Keras. is there an implementation of YOLO Nano on Pytorch?

I saw a PyTorch version yolo_nano on github

For that implementation, there is no pre-trained model. I am not sure whether that implementation is correct or not. your network file is validated as you have pre-trained model.

If just want to know the YOLO Nano model structure, you can download & extract the pretrained weight and dump it out to an inference model file with model dump cmd. Then open model file with netron

Hi,

I have downloaded the yolo_nano weights file: yolo3_nano_weights_416_voc.h5. according to your model dump cmd, what the command should be if I would like to dump the yolo3_nano_weights_416_voc.h5 file as a network file?

Thanks

david8862 commented 4 years ago

yolo3_nano_weights_416_voc.h5

You can try

python yolo.py --model_type=yolo3_nano --weights_path=yolo3_nano_weights_416_voc.h5 --anchors_path=configs/yolo3_anchors.txt --classes_path=configs/voc_classes.txt --model_image_size=416x416 --dump_model --output_model_file=yolo3_nano.h5

P.S. I just found I made a mistake recently in the model dump script, and fix just committed. So pull the latest code and try again if you meet any problem.

ardeal commented 4 years ago

yolo3_nano_weights_416_voc.h5

You can try

python yolo.py --model_type=yolo3_nano --weights_path=yolo3_nano_weights_416_voc.h5 --anchors_path=configs/yolo3_anchors.txt --classes_path=configs/voc_classes.txt --model_image_size=416x416 --dump_model --output_model_file=yolo3_nano.h5

P.S. I just found I made a mistake recently in the model dump script, and fix just committed. So pull the latest code and try again if you meet any problem.

Hi,

I run your code yolo.py with the command your posted on this page, and a file yolo3_nano.h5 is generated.I then open the h5 file with Netron. I could see the network of Yolo Nano on Netron correctly.

now, I would like to generate the netwrok file whose format like the file: https://github.com/eriklindernoren/PyTorch-YOLOv3/blob/master/config/yolov3.cfg

how could I generate such a format file using the trained weights file?

Thanks

david8862 commented 4 years ago

yolo3_nano_weights_416_voc.h5

You can try

python yolo.py --model_type=yolo3_nano --weights_path=yolo3_nano_weights_416_voc.h5 --anchors_path=configs/yolo3_anchors.txt --classes_path=configs/voc_classes.txt --model_image_size=416x416 --dump_model --output_model_file=yolo3_nano.h5

P.S. I just found I made a mistake recently in the model dump script, and fix just committed. So pull the latest code and try again if you meet any problem.

Hi,

I run your code yolo.py with the command your posted on this page, and a file yolo3_nano.h5 is generated.I then open the h5 file with Netron. I could see the network of Yolo Nano on Netron correctly.

now, I would like to generate the netwrok file whose format like the file: https://github.com/eriklindernoren/PyTorch-YOLOv3/blob/master/config/yolov3.cfg

how could I generate such a format file using the trained weights file?

Thanks

sorry for response delay. I didn't have such tool for darknet .cfg generation. Maybe you can refer the convert.py which is to dump out keras model from darknet .cfg and .weights and try to create one script for that.

ardeal commented 4 years ago

Hi David,

I got YoloNano model which is trained by pytorch. The model file is .pth extension. Could it be able to be dumped by your tool? If it could, what command should I input?

Thanks

david8862 commented 4 years ago

Hi David,

I got YoloNano model which is trained by pytorch. The model file is .pth extension. Could it be able to be dumped by your tool? If it could, what command should I input?

Thanks

Hi @ardeal, scripts in this repo are only valid for tf/tf.keras framework, so it couldn't be applied to pytorch models.

ardeal commented 4 years ago

Hi David, I got YoloNano model which is trained by pytorch. The model file is .pth extension. Could it be able to be dumped by your tool? If it could, what command should I input? Thanks

Hi @ardeal, scripts in this repo are only valid for tf/tf.keras framework, so it couldn't be applied to pytorch models.

Thank you David!

as you know, is there any tool or script that could dump .pth(pytorch model file)?

Thanks,

david8862 commented 4 years ago

Hi David, I got YoloNano model which is trained by pytorch. The model file is .pth extension. Could it be able to be dumped by your tool? If it could, what command should I input? Thanks

Hi @ardeal, scripts in this repo are only valid for tf/tf.keras framework, so it couldn't be applied to pytorch models.

Thank you David!

as you know, is there any tool or script that could dump .pth(pytorch model file)?

Thanks,

You mean to dump .pth to onnx model? Pytorch have standard export interface for that: https://pytorch.org/docs/stable/onnx.html

ardeal commented 4 years ago

I would like to dump the model and then, visualize the model by netron

david8862 commented 4 years ago

I would like to dump the model and then, visualize the model by netron

netron should have support visualizing .pth model file, and also .onnx model

ardeal commented 4 years ago

I have tried to visualize the .pth model, but the visualized graphic is not good.