Skip to content

YOLOV8 detection based on image enhancement #10239

Answered by glenn-jocher
jJIANGHE5416 asked this question in Q&A
Discussion options

You must be logged in to vote

@jJIANGHE5416 hello! Combining low-light image enhancement with YOLOv8 can indeed help with detection in challenging lighting conditions. A common approach is to preprocess your images for enhancement before feeding them into the YOLOv8 model for detection. Here's a basic outline you can follow using Python:

from ultralytics import YOLO
import cv2

# Load your YOLOv8 model
model = YOLO('yolov8n.pt')

# Preprocess your image
image_path = 'path/to/your/low-light/image.jpg'
img = cv2.imread(image_path)

# Apply your low-light enhancement algorithm (example with simple histogram equalization)
img_enhanced = cv2.equalizeHist(cv2.cvtColor(img, cv2.COLOR_BGR2GRAY))

# Detect objects
results = model

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@jJIANGHE5416
Comment options

@glenn-jocher
Comment options

@jJIANGHE5416
Comment options

@glenn-jocher
Comment options

@maydo82
Comment options

Answer selected by jJIANGHE5416
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants