This project focuses on preprocessing and segmenting axons and myelin from microscopy images stored in the BIDS format. It leverages OpenCV for image manipulation and is designed to work with object detection models like YOLO or RetinaNet.
- Loads BIDS-formatted microscopy images.
- Automatically adjusts pixel values based on metadata.
- Resizes and pads images to fit object detection model input sizes.
- Addinded
- Includes a
utils.py
file with helper functions for easy preprocessing.
- Python 3.x
- OpenCV (
pip install opencv-python
)
-
Create a Virtual Environment:
python -m venv venv
-
Activate a Virtual Environment:
source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
### Old yolo model:
cd src
python preprocessing.py
python yolo_train.py
### Specific script for RetinaNet model:
```bash
cd src
python -m retinaNet.retinaNet_train