Python Lane Visibility Scoring

Заказчик: AI | Опубликовано: 06.02.2026
Бюджет: 750 $

I need a clear, well-structured Python pipeline that ingests JPEG road images and their corresponding lane-segmentation masks (they sit in two separate folders sharing the same filenames) and returns one scalar per frame: a normalized lane-visibility score. The number is meant for relative comparison only, so internal units do not have to match any physical standard—just remain self-consistent frame to frame. The logic I have in mind revolves around four cues: • Brightness of the lane pixels themselves • Contrast between those pixels and adjacent pavement pixels • A distance weighting that values pixels closer to the camera more heavily than distant ones • A continuity penalty that reduces the score when the mask reveals breaks or flicker in the lane line Feel free to propose additional minor refinements if they improve stability, but please keep the core idea intact. OpenCV, NumPy, and scikit-image are the tools I already use elsewhere, so sticking to that stack will make adoption easiest. The code should be clean, modular, and fast enough to process typical 1080p sequences in real time or near real time on a modern CPU (GPU use is optional but not required). Deliverables • A self-contained Python module or notebook that loads the images, computes the score, and can be called from the command line with a folder path argument • Inline documentation and a short README explaining installation, expected folder layout, and the mathematics behind the normalization • A sample run on a small dummy dataset demonstrating that the score remains stable across frames of similar quality and reacts sensibly to simulated occlusions or low-contrast conditions I will test the solution on my own video sequences, so please keep paths and parameters configurable.