Build a full-stack web application that allows users to upload a Dental X-ray DICOM image, sends it to a Roboflow object detection model, displays bounding boxes for detected pathologies on the image, and passes the image + annotations to an LLM to generate a textual diagnostic report, which will be shown in a panel on the dashboard.
-
Upload X-ray
- Users upload dental X-ray files (
.dcm,.rvg) through the frontend.
- Users upload dental X-ray files (
-
DICOM Conversion
- If the file is in DICOM format, it is converted to PNG using
pydicomandPillowin the backend.
- If the file is in DICOM format, it is converted to PNG using
-
Object Detection (Roboflow)
- The image is sent to Roboflow’s object detection model (e.g., for detecting cavities, periapical lesions).
- The model returns bounding boxes and labels of detected conditions.
-
Diagnostic Report Generation (LLM)
- The predictions are then sent to Gemini Flash 2.0 to generate a clinical diagnostic report.
- The report includes findings, locations, and clinical suggestions.
-
Display Results
- The annotated image with bounding boxes is shown on the left panel.
- The generated diagnostic report is shown on the right panel.
- The reports are dsiplayed on the right panel with the option to download it
- Backend: FastAPI (Python)
- Frontend: ReactJS
- Object Detection Model: Roboflow API (cavities and periapical lesion detection)
- LLM (Large Language Model): GEMINI (model:- gemini-2.0-flash)
- Image Format: DICOM (.dcm)
- Visualization: Bounding boxes overlaid on original image
- Packaging: Docker
- Upload and convert DICOM (.dcm or .rvg) images to viewable PNG/JPG format
- Display original and annotated images with bounding boxes showing pathology name and confidence
- Pinch zoom feature toggles when clicking on the image for better inspection
- Generate diagnostic reports using LLM based on image annotations
- Download diagnostic reports as text files
- Support multiple file uploads
- Loading spinners during API calls
- Dockerized backend and frontend
- Navigate to the
backenddirectory - Create a virtual environment and activate it
- Install dependencies:
pip install -r requirements.txt
- Run the FastAPI server:
uvicorn main:app --reload
- Navigate to the
frontenddirectory - Install dependencies:
npm install
- Run the development server:
npm run dev
- Use
docker-compose.ymlto build and run backend and frontend containers:docker-compose up --build
POST /api/predict- Upload DICOM image, process with Roboflow, generate report- Request: multipart/form-data with file
- Response: JSON with image URL, predictions, image dimensions, and diagnostic report
- Upload one or more DICOM images using the file upload area
- Click "Analyze X-ray" to process images
- View original and annotated images with bounding boxes in the left panel
- Click on an image to toggle pinch zoom for detailed inspection
- View generated diagnostic reports in the right panel
- Download reports using the "Download Report" button
- Backend tests located in
backend/tests/ - Run tests using pytest:
pytest backend/tests/
- Frontend manual testing recommended for UI interactions and integration
- Emptying the
backend/staticandbackend/convertedfolders will remove cached images but will not break the app; images will be regenerated on upload - Ensure you have a valid Roboflow API key configured in the backend environment
- Pinch zoom toggles on image click for better user experience
We welcome contributions to make DentoScan even better!
- Fork the repo and submit pull requests for improvements, bug fixes, or new features.
- Please ensure your code follows existing style guidelines.
-
deployed using Netlify
-
deployed using Render