nanodet icon indicating copy to clipboard operation
nanodet copied to clipboard

Change model signature of Nanodet model

Open adithya1-7 opened this issue 2 years ago • 1 comments

I was following instructions of the below-mentioned repo to convert PyTorch model(.pth) to TensorflowJS format. https://github.com/vladmandic/nanodet

Using the default config (nanodet-m-416.yml) and the pretrained model (nanodet_m_416.pth), I ended up with a model having this signature: git2

But the code expects the model to have this signature git1

I need help in fixing the signature of the model

adithya1-7 avatar Aug 30 '22 11:08 adithya1-7

@adithya1-7

nanodet-plus is very different than previous version of nanodet and it seems that all outputs layers are flattened when exporting to onnx.

for example, in the old export_onnx.py: output_names = generate_ouput_names(config.model.arch.head)
and in the new export_onnx.py: output_names=["output"]

and even in model architecture itself, it seems that its designed to return single result and the handle it in post processing

all-in-all, this is a completely different beast and would need to figure out post-processing on how to interpret results - but at the moment, i have no time or desire to do so - sorry.

vladmandic avatar Aug 30 '22 15:08 vladmandic