1 Star 0 Fork 3

CV爱好者/djl-demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

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
马建仓 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