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 -Dai.djl.repository.zoo.location=models/saved_model
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 -Dai.djl.repository.zoo.location=models/saved_model
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。