img_ai_app_boilerplate icon indicating copy to clipboard operation
img_ai_app_boilerplate copied to clipboard

Adding Support for PyTorch Models 🤖

Open smaranjitghose opened this issue 4 years ago • 0 comments
trafficstars

  • Rename the function our_image_classifier to img_class_tf in the image_classifier.py
  • Write another function img_class_torch and 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 blank model.pth file 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

smaranjitghose avatar Jan 06 '21 12:01 smaranjitghose