This project is a full-stack application designed for the segmentation of medical images, with a specific focus on organoids. It utilizes a deep learning model on the backend and provides a user-friendly interface on the frontend for image upload and analysis.
Medical image analysis is a critical component of diagnostics and research. The accurate segmentation of specific structures, such as organoids, from complex images is a time-consuming and challenging task when done manually. This project aims to automate this process by using a deep learning model (Attention U-Net) to perform precise and efficient image segmentation, saving time and improving accuracy for researchers. This is what I came up with when I saw the dataset.
The project is divided into two main components:
- Backend: A Python-based API built with FastAPI. It handles image processing, runs the segmentation model, and serves the results. The deep learning model is an Attention U-Net implemented using PyTorch.
- Frontend: A modern, responsive user interface built with React and Vite. It allows users to upload images and view the segmentation results returned by the backend.
To get the application running locally, you will need to start both the backend server and the frontend development server.
The backend is managed using uv, a fast Python package installer and resolver.
Prerequisites:
- Python 3
uvinstalled (pip install uv)
Instructions:
-
Navigate to the project root directory:
cd path/to/miso -
Create a virtual environment and install dependencies:
# Old school uv venv uv pip install -r requirements.txt # One line uv sync
(Note: If a
requirements.txtis not present, you can generate one frompyproject.tomlor install dependencies directly withuv pip install -e .) -
Start the server: The application is run using
uvicorn. From the root directory, run:uvicorn main:app --host 0.0.0.0 --port 8000 --reload
The API will be available at
http://localhost:8000. You can go tohttps://localhost:8000/docsto see list of endpoints and how to use them.
The frontend is a standard React application managed with npm.
Prerequisites:
Instructions:
-
Navigate to the frontend directory:
cd path/to/miso/frontend -
Install dependencies:
npm install
-
Start the development server:
npm run dev
The frontend application will be available at
http://localhost:5173(or another port if 5173 is busy). You can now open this URL in your browser to use the application.