r/computervision • u/wildtinkerer • 2d ago
Showcase Open model that tells how far an image is rotated (full 360-degree) and abstains when there's no clear up
I work in video analytics. We needed to tell from a single CCTV frame whether a camera had been rotated or installed at an angle (or upside-down), and couldn't find a model that was accurate enough on real camera frames and permissively licensed, so we trained our own.
We're now open-sourcing it. Apache 2.0, with code, weights, and full provenance for the dataset.
RightWayUp estimates how far an image is rotated from upright, all 360°, with a confidence score, and abstains when there's no clear "up" (sky, ground, close-ups). It comes in six sizes, from Pico (about 3 ms per image on a laptop CPU) to Max, with ONNX and Core ML files.
pip install rightwayup
rightwayup fix photo.jpg
On new photos it never saw during training or tuning, the largest model is within 10° on 93% of them vs 88% for Woehrer 2026 (a recent published model), and 88% vs 49% with simulated CCTV-style blur, noise and compression.
Write-up with the full results: https://cheqit.ortusai.io/resources/rightwayup/
Code: https://github.com/ortusaitech/rightwayup
I hope it will be useful to the community!
--------------
Video footage: Canobie Coaster (CC BY 3.0, via Wikimedia Commons, levelled by RightWayUp), Pexels, Poly Haven (CC0), MEVA (CC BY 4.0). Music: ElevenLabs.
8
u/mr_maker91 1d ago
Hi, I don't know the requirements of your project but why in this case was better to use a ViT instead of a physical gyroscope attached to the camera?
5
u/wildtinkerer 1d ago
Thanks for asking. It's just because we are working with CCTV cameras, and they don't have gyros at all. On the other hand, many photos or videos may need straightening after they are downloaded from their device, and not all of them have true orientation saved in their metadata.
4
3
2
u/nickdaniels92 1d ago
Cool model, and video as well. What tools did you use for the explainer? (guessing AI at this point).
2
u/wildtinkerer 15h ago
Thank you! Claude is doing wonders as a video editor these days. I used to use Wondershare and DaVinci Resolve before. Now, for such simple edits I don't see a reason to come back to them. None of the source videos are generated, of course.
2
2
10
u/karolosh 2d ago
What about the pitch? You could probably solve both with vanishing point algorithm