Skip to content

Instantly share code, notes, and snippets.

@filipsedivy
Created March 21, 2022 13:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save filipsedivy/77c6921743836b2bd43e72b72f8bee08 to your computer and use it in GitHub Desktop.
Save filipsedivy/77c6921743836b2bd43e72b72f8bee08 to your computer and use it in GitHub Desktop.
import java.nio.file.*;
import ai.djl.modality.cv.ImageFactory;
Path imagePath = Paths.get("/Users/xyz/Image.jpg");
Image image = ImageFactory.getInstance().fromFile(imagePath);
Classifications classifications = predictor.predict(image);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment