IoTinall
IoTinall
`public static DetectedObjects predict() throws IOException { Path imageFile = Paths.get("/Users/iotinall/Desktop/LHQJW/K44464075_1_20230605T121021Z.jpg"); Image img = ImageFactory.getInstance().fromFile(imageFile); Criteria criteria=Criteria.builder() .setTypes(Image.class,DetectedObjects.class) .optModelPath(Paths.get("/Users/iotinall/Desktop/torchmodel")) .optModelName("best.torchscript.pt") .optTranslatorFactory( new YoloTranslatorFactory()) .optEngine("PyTorch") .build(); try (ZooModel model = criteria.loadModel())...
> We didn't test `YoloTranslator` with yolov7, there might some difference in yolov7 output tensor layout. > > Do you know what's the model's expected image size? When I trained...
> You didn't set image size in your Translator, the default will be resize to 224 x 224  After setting the image size, the program now reports an error...
> How many classes when you train your model? The number of classes in synset must match to classes in your training three number of classes