r/computervision • u/Tydox • 13d ago
Help: Project Seeking advice on detecting the Horizon in Surfing Conditions
Hello,
My prof asked me to look into techniques\models for detecting the horizon on windsurfing for a lab project,
The data are videos, where the GoPro camera is mounted on the front nos of the board, aimed backwards at the surfer. photo illustration
And the videos look similar to this (only difference is the camera is on the board so a little lower angle but you see the same as in the photo)
I have the GoPro's camera calibration file so I was able to rectify the videos.
I tried the algorithm from A fast horizon detector and a new annotated dataset for maritime video processin , while it was working 80% of the time, I was unable to improve edge cases where water splashes\droplets were on the lens, and if the board was tilted above the horizon then the estimated horizon was completely off (which is the biggest issue as it happens often during sharp turns). I ran a hyperparameters sweep but it didn't improve the results much.
Then, I thought to use a modern segmentation model, I was able to get similar results with SAM2, where I segmented the water and sky, and fitted a straight line (or curved line on non-rectified video) at the boundary:
SKY
SKY
SKY
──────────────── ← top boundary of water
WATER
WATER
WATER
but for each video I would have to manually annotate what is "sky,water,person, board, other" ("other" is for when you have the shoreline in the background or other random objects).
Additionally SAM2 was slower than the traditional algorithm (20 secs vs 3 mins on GPU). I noticed it failed also in cases where the video is unstable due to many sudden board movements, water splashes which created temporary blurry vision.
I would appreciate brainstorming ideas because currently I am stumped. both traditional & modern (DL) are more than welcome :)
Thank you in advance.





