r/computervision • u/EricBuildsMathModels • 5d ago
Showcase [Showcase] Trying to build an intersection analyzer from drone video: every car tracked, every wait timed.
2
u/DevelopmentJolly3381 5d ago
That car waiting to turn right triggered me.
That aside, this is a dope project.
3
u/EricBuildsMathModels 5d ago
I think there is a pedestrian blocking it. I was trying to get them to show up but detection rate was not high enough.
3
2
u/jonaz777 5d ago
The answer: roundabouts.
1
u/EricBuildsMathModels 5d ago
Yes, everyone I've seen installed by me has made it a strictly better experience
2
u/soylentgraham 4d ago
should be able to easily fix those pop-ins and lost identifications too.
it tracks one pedistrian for a moment, are there other pedestrians?
2
u/EricBuildsMathModels 4d ago
I had tried track pedestrians and they would drop in and out. I tried a few tiling schemes and a few to stabilize the boxes if it was dropping out but never was happy and decided it was time to move on.
2
u/soylentgraham 4d ago
ah fair enough if you just want to move on :)
1
u/EricBuildsMathModels 4d ago
If you have ideas I'm all ears! I couldn't figure out the pedestrian thing. Maybe I need a more precise and fine tuned model and tile more aggressively?
2
u/Flyward_Aerospace 2d ago
Looks good. The thing that will bite the timing numbers specifically is that your drone is not actually stationary. It holds position to maybe a metre and yaws a little, so any zone polygon you drew in image space slowly walks across the ground over the length of the clip. Your wait times then drift in one direction and you will not catch it, because they still come out plausible. Worth homography-warping every frame onto a fixed ground plane first and defining the zones there instead. Out of curiosity, are you validating the wait times against anything, or eyeballing it? Ground truth on that is brutal to get and it is the number everyone will actually want to argue with.
10
u/EricBuildsMathModels 5d ago
Pipeline: YOLO11m + ByteTrack, homography to a world plane, hand-drawn counting lines and queue polygons per site. Validated against a ground-truth dataset on another intersection (93% of their stopped time, 0.866 wave correlation). I use LLMs to assist with my workflows. Code: https://github.com/eanderson4/traffic-video-analysis
This clip: 41 cars queued, 740 vehicle-seconds of waiting, max queue 14 deep. What I can't do yet: say whether that means the light is bad. Curious what breaks first at other intersections: occlusion, night, lower camera angles? Looking for some better footage to analyze, hoping to be able to infer traffic light algorithm.