This is an example to demonstrate how to use Deep Java Library to detect Pneumonia based on Chest X-ray images.
For more details, please follow Chest X-Ray Images (Pneumonia) on Kaggle and this Kernel.
You can obtain the training script from the above Kernel. We will use the model and DJL for prediction.
run the following command to build the project:
./gradlew build
You can download some of the X-ray images for testing dataset on kaggle. We will use a default image for prediction if no input image is specified.
You can find a trained model here, download and unzip it.
run the following command for linux/macOS:
mkdir models
cd models
curl https://djl-ai.s3.amazonaws.com/resources/demo/pneumonia-detection-model/saved_model.zip | jar xv
cd ..
./gradlew run
run the following command for Windows:
mkdir models
cd models
curl https://djl-ai.s3.amazonaws.com/resources/demo/pneumonia-detection-model/saved_model.zip | jar xv
cd ..
..\gradlew run