MediScan is a breast cancer detection system leveraging the power of YOLO v12 for accurate object detection. The project consists of a Python-based FastAPI backend for inference and a modern Next.js frontend for user interaction.
- High-Performance Detection: Uses YOLO v12 trained on medical imaging datasets.
- Interactive UI: User-friendly interface built with Next.js, Tailwind CSS, and Shadcn/UI.
- Fast Inference: Accelerated backend processing with FastAPI and OpenCV.
- Visual Feedback: Displays annotated images with detected regions and confidence scores.
- Framework: FastAPI
- Language: Python
- ML Model: YOLO v12 (Ultralytics)
- Image Processing: OpenCV, IPv6
- Framework: Next.js
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: Radix UI / Shadcn
MediScan/
├── Backend/
│ ├── BackendLogic.py # Main API entry point
│ └── best.pt # Trained YOLO model weights
├── Frontend/
│ └── image-upload-api(1)/ # Next.js frontend application
└── README.md
- Python 3.8+
- Node.js 18+ & npm
Navigate to the backend directory:
cd BackendRecommended: Create and activate a virtual environment:
# Windows
python -m venv venv
.\venv\Scripts\activate
# macOS/Linux
python3 -m venv venv
source venv/bin/activateInstall the required dependencies:
pip install fastapi uvicorn opencv-python numpy ultralytics python-multipartStart the backend server:
uvicorn BackendLogic:app --reloadThe API will be available at http://localhost:8000.
Navigate to the frontend directory:
cd Frontend/image-upload-api(1)Install dependencies:
npm installStart the development server:
npm run devOpen your browser and navigate to http://localhost:3000 to use the application.
- Ensure both the backend and frontend servers are running.
- Open the frontend URL (
http://localhost:3000). - Upload a medical scan image using the interface.
- The system will process the image and display the detected results with bounding boxes and confidence scores.