Repository navigation
Releases: Moobbot/CVD-Risk-Estimator
Releases · Moobbot/CVD-Risk-Estimator
Release list
v1.2.0
What's Changed
- V.1.1.0 by @Moobbot in #6
- feat: Update Docker configuration to support GPU access and modify CPU service naming by @Moobbot in #7
- feat: Update Docker configuration to support GPU access and modify CPU service naming by @Moobbot in #8
- V.1.1.0 by @Moobbot in #9
Full Changelog: v1.0.2...v1.2.0
v1.1.0
v1.0.2
[v1.0.2] - 2024-03-19
Added
- Thêm cấu hình môi trường và tài liệu cho API setup, logging, và tính năng cleanup.
- Cải thiện logging với mã hóa UTF-8 và nâng cao thông báo log để rõ ràng hơn.
- Tăng cường xử lý DICOM với cải thiện xử lý lỗi, logging, và các endpoint API mới cho dự đoán và tải xuống file.
- Thêm chức năng xử lý DICOM và phát hiện tim.
- Thêm triển khai mô hình 2D TriNet với tải dữ liệu và tăng cường dữ liệu.
Changed
- Đơn giản hóa cấu hình logging bằng cách tích hợp trình xử lý file dựa trên ngày và loại bỏ các cấu hình dư thừa.
- Cập nhật các biến môi trường để rõ ràng hơn và định dạng chính xác; thêm ghi chú về vị trí comment.
Fixed
- Sửa lỗi trong việc cập nhật các biến môi trường và định dạng.
Full Changelog: v1.0.0...v1.0.2
CVD Risk Prediction API v1.0.0
CVD Risk Prediction API v1.0.0
Overview
This release introduces the CVD Risk Prediction API, a FastAPI-based service that provides cardiovascular disease (CVD) risk prediction from DICOM images using the Tri2D-Net deep learning model.
Key Features
- DICOM Processing: Upload and process DICOM images in ZIP format
- Heart Detection: Automatic heart region detection using RetinaNet
- Risk Prediction: CVD risk prediction using Tri2D-Net model
- Visualization: Grad-CAM visualization of regions contributing to prediction
- Attention Scoring: Analysis of attention scores for each image slice
- REST API: Complete REST API with documentation
API Endpoints and Response Formats
POST /api_predict
Upload a ZIP file containing DICOM images for CVD risk prediction.
Response Format:
{
"session_id": "uuid-string",
"predictions": [
{
"score": 0.75 // CVD risk score between 0-1
}
],
"overlay_images": "http://server/download_zip/uuid-string",
"attention_info": {
"attention_scores": [
{
"file_name_pred": "pred_image1.png",
"attention_score": 0.85
}
],
"total_images": 120,
"returned_images": 45
},
"message": "Prediction successful."
}GET /download_zip/{session_id}
Download a ZIP file containing visualization results.
Response:
- Binary file (application/zip) containing Grad-CAM visualizations
GET /preview/{session_id}/{filename}
Preview a specific visualization image.
Response:
- Image file (image/png) showing the requested visualization
Technical Details
- Built with FastAPI for high-performance API endpoints
- Integrates SimpleITK for medical image processing
- Implements PyTorch-based deep learning models
- Provides comprehensive logging and error handling
- Includes automatic cleanup of temporary files
Installation
# Clone the repository
git clone https://github.com/your-username/cvd-risk-prediction.git
# Install dependencies
cd cvd-risk-prediction
python setup.pyUsage
# Start the API server
python api.pyAPI Documentation
Once running, API documentation is available at:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
Model Information
The Tri2D-Net model is based on research published in Nature Communications.
License
This project is licensed under the MIT License - see the LICENSE file for details.