1 Star 0 Fork 3

CV爱好者/djl-demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
README.md 1.88 KB
一键复制 编辑 原始数据 按行查看 历史

Pneumonia Detection

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.

Setup

run the following command to build the project:

./gradlew build

Run prediction on images

Prepare images

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.

Prepare trained model

You can find a trained model here, download and unzip it.

Run prediction

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

Reference:

  1. Detecting Pneumonia based on chest X-ray images using Depthwise Convolution
  2. DJL TensorFlow Engine
  3. DJL TensorFlow Documentation
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/cvfan/djl-demo.git
git@gitee.com:cvfan/djl-demo.git
cvfan
djl-demo
djl-demo
master

搜索帮助

371d5123 14472233 46e8bd33 14472233