img_ai_app_boilerplate
img_ai_app_boilerplate copied to clipboard
Adding Support for PyTorch Models 🤖
trafficstars
- Rename the function
our_image_classifiertoimg_class_tfin theimage_classifier.py - Write another function
img_class_torchand define to load an image, convert it to the necessary numpy array (or any form you deem necessary, load a pytorch model (just make a blankmodel.pthfile in the models folder for reference but before giving the PR, test it with any custom trained model and attach the video clip of the working demo), run inference and return the result. - Note how the labels are defined.
- Feel free to add try catch statements for better debugging