Resnet50 is not UTF-8 encoded

Please provide the following information when requesting support.

• Hardware (RGX 3080)
• Network Type (Classification)
• TLT Version format_version: 2.0
toolkit_version: 3.22.05
published_date: 05/25/2022()
• Training spec file
• How to reproduce the issue ?

I am attempting to retrain the pretrained Resnet-50 model with my own dataset. Running “tao classification train” is successful and produces the following:


However when the training loop begins it is interrupted at the beginning of epoch 1 by the following UnidentifiedImageError:

The byom_voc Jupyter Notebook cannot be accessed and the resnet50 file inside classification/pretrained_resnet50 has the following error message:

I believe the last alert is flagging the cause of the problem of the unidentified image.

Firstly, am I right?
Secondly, how do I uncompress the resnet50 .tar so that it is UTF-8 encoded?
Thirdly, if I am wrong, please advise

Can you share the training spec file?

training_spec.cfg (1.1 KB)

Are you going to use BYOM or not ?

Yes I am using BYOM.
I am hoping to pick up the BYOM project which I had already started when a series of error messages led me to reach out to you for guidance. However if there is something wrong with my resnet50 model I realise that I may need to begin the exercise again.

If you are going to use BYOM, please go through BYOM Converter — TAO Toolkit 3.22.05 documentation and GitHub - NVIDIA-AI-IOT/tao_byom_examples: Examples of converting different open-source deep learning models to TAO compatible format through TAO BYOM package. to generate .tltb file.

Thank you Morganh.

Can I assume that the downloaded resnet_50.hdf5 file from the NGC registry is an ONNX model?

No, resnet_50.hdf5 is not an ONNX model.

Thank you.

So, I should follow the ResNet example in the github tao_byom_examples/classification/README.md(?) and export the Resnet50 PyTorch model to ONNX(?)

As mentioned above, if you are going to use BYOM, please go through BYOM Converter — TAO Toolkit 3.22.05 documentation and GitHub - NVIDIA-AI-IOT/tao_byom_examples: Examples of converting different open-source deep learning models to TAO compatible format through TAO BYOM package. to generate .tltb file.
Then set the .tltb file as the pretrained model in the training spec file.

1 Like

Thank you.

In the gitub ReadMe for classification it says that a resnet model can be easily exported to ONNX using the command:
python export_torchvision.py -m resnet18


What is the equivalent command to export my resnet_50.hdf5 file, which is currently in my TAO_toolkit/models directory please?

Is this resnet_50 hdf5 file downloaded from ngc website?

Is this resnet_50 hdf5 file downloaded from ngc website?

Yes.

The resnet_50 hdf5 file from ngc is not an onnx model or pytorch model. We do not need to run BYOM against it.
BYOM is a Python-based package that converts any open-source ONNX model to a TAO-comaptible model. The TAO BYOM Converter provides a CLI to import an ONNX model and convert it to Keras. The converted model is stored in .tltb format, which is based on EFF.

If you want to run classification with resnet_50 hdf5 file from ngc, there is another notebook under classification folder. You can refer to it. The resnet_50.hdf5 file can be loaded as pretrained weights directly.


please explain “another notebook under classification folder.”

I only see the byom_classification notebook (in byom_voc) and the classification notebook (in tao_voc).
What is this other notebook called?

Please use tao_voc notebook.

OK, thank you, will do.

Is there any documentation that relates to using the tao_voc notebook for this purpose?

There is no update from you for a period, assuming this is not an issue anymore.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

In previous TAO versions, only tao_voc is available because the BYOM feature is not available.
Since BYOM is available for classification in latest TAO 22.05, so we make a new notebook(BYOM_voc) for end user to get familiar with BYOM in classification.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.