This project combines low-light image enhancement techniques with object detection using YOLOv8. It is designed to improve visibility in dark images before performing object detection.
- enhance.py: Core utility functions for image processing. Contains algorithms to artificially darken images and enhance low-light images using CLAHE (Contrast Limited Adaptive Histogram Equalization).
- make_dark.py: A demonstration script that takes an input image (
bus.jpg), creates a darkened version (bus_dark.jpg), and then applies enhancement (bus_enhanced.jpg). - train.py: Script to train a YOLOv8n model on a dataset (currently configured for
coco128.yaml). - configs/: Configuration files.
- inference.py: (Placeholder) For running inference on images/videos.
- evaluate.py: (Placeholder) For evaluating model performance.
- Clone the repository.
git clone https://github.com/witharyank/Lowlight
cd lowlight- Install the required dependencies:
pip install -r requirements.txtTo test the image enhancement capabilities:
python make_dark.pyThis will generate:
bus_dark.jpg: Artificially darkened image.bus_enhanced.jpg: The restored version of the dark image.
To start training the YOLOv8 model:
python train.pyNote: Ensure you have the necessary datasets configured in your YAML files.
- Python 3.8+
- OpenCV
- Ultralytics YOLO
- NumPy
- (See
requirements.txtfor full list)
Kumar Aryan GitHub: https://github.com/witharyank