-
Notifications
You must be signed in to change notification settings - Fork 0
Nanodet
Follow https://github.com/RangiLyu/nanodet/blob/main/demo/demo-inference-with-pytorch.ipynb
Use checkpoint file nanodet_m.chkp (version 0.40 or 0.42) instead of .pth file.
Should work, can use plain Python if using cv2.imshow instead of Jupyter function. Note cv2.imshow requires window name as first parameter!
Notebook homedir is: /home/notebook
nanodet models can be trained as per instructions at https://github.com/RangiLyu/nanodet
E.g. for Yolo style training data use command like
python tools/train.py config/nanodet-plus-m_416-yolo-kiwi2.yml
Edit yml-File for location of training data, epochs and previous model
GPU recommendet!!!
Training step results in Pytorch ckpt file. Convert to onnx format with nanodet tool like:
python tools/export_onnx.py --cfg_path config/nanodet-plus-m-1.5x_416.yml --model_path /home/kugel/Downloads/nanodet-plus-m-1.5x_416_checkpoint.ckpt
Then convert to ncnn format with ncnn tool like:
/tools/onnx/onnx2ncnn nanodet-m1_5x.onnx nanodet-plus_m_1.5x_416.param nanodet-plus_m_1.5x_416.bin