r/computervision • • Aug 21 '26

Showcase Random Time, Weather and Camera Lenses. Synthetic Data Unreal Engine

116 Upvotes

I rendered this video in Unreal Engine 5.8 using a custom plugin I'm working on. I need ideas for things to randomize for this dataset that I'm building I currently have time, weather, camera lenses. Btw if anyone needs https://getnameframe.com/


r/computervision • • Aug 03 '26

Help: Theory Auto-labelling datasets with SAM 3: the prep work matters more than the model

Post image
116 Upvotes

My hope with this post is that I will save at least one person some time - and that will be enough for me. I spent the last couple of weeks building an auto-labelling pipeline on SAM 3 and figured the gotchas were worth writing down, because most of what I got wrong had nothing to do with the model.

Quick context if you haven't used it: SAM 3 does what Meta calls Promptable Concept Segmentation. You give it a short noun phrase - forklift, person in hi-vis vest - and it segments every instance of that concept. No seed clicks, no fixed class list, no fine-tuning. That's the bit that makes unattended labelling possible; with SAM 2 you still needed something to tell it where to look.

The minimal version is genuinely this short:

from transformers import Sam3Model, Sam3Processor

model = Sam3Model.from_pretrained("facebook/sam3").to("cuda").eval()

processor = Sam3Processor.from_pretrained("facebook/sam3")

inputs = processor(images=image, text="forklift", return_tensors="pt").to(model.device)

with torch.inference_mode():

outputs = model(**inputs)

results = processor.post_process_instance_segmentation(

outputs, threshold=0.5, mask_threshold=0.5,

target_sizes=inputs["original_sizes"].tolist(),

)[0]

# results["masks"] / ["boxes"] / ["scores"]

That works. Everything below is what I learned scaling it past one image.

1. Reuse the vision embedding across prompts

Naive multi-class loop encodes the image once per class. 3 classes × 40k images = 120k passes through an 848M-param backbone, 80k of which recompute something you already had. SAM 3 lets you split it:

vision_embeds = model.get_vision_features(pixel_values=inputs.pixel_values)

for prompt in prompts:

text_inputs = processor(text=prompt, return_tensors="pt").to(model.device)

outputs = model(vision_embeds=vision_embeds, **text_inputs)

Backbone runs once, only the text conditioning and mask decode repeat. Close to an N-fold speedup on multi-class jobs. There's a mirror version (get_text_features) for one prompt across many images.

2. Resolution is tricky

SAM 3 runs at 1008px native. Two failure modes:

  • Upscaling small images to 1008 gives you confidently mushy boundaries. It adds no information.

  • Downscaling big images destroys small objects. A 40px defect in a 4000px frame becomes a 10px smudge at 1008. If your targets are tiny, tile into overlapping 1008px crops and merge masks back with the offset. Don't resize.

Also: run ImageOps.exif_transpose() before anything else, or phone photos come back with masks correct for the stored orientation and wrong for the one you see.

3. Prompt phrasing does more than threshold tuning

Short concrete noun phrases. Singular. One concept per prompt.

  • forklift ✅ / find all the forklifts ❌

  • person in hi-vis vest ✅ / PPE compliant worker ❌ (trained on how things look, not your industry's vocabulary)

  • car or truck ❌ - that's two prompts

Biggest thing: test each prompt against images you know contain none of that class. A prompt that quietly fires on empty frames poisons the whole dataset. And if a prompt over-fires, add an adjective before you touch the threshold - white bicycle vs bicycle returns genuinely different sets.

4. You can sweep thresholds without re-running inference

The detection threshold is just a filter over stored confidence scores. So label a 50-image dev slice once at threshold=0.15, keep every score, and sweep offline.

Look for the false-positive cliff and stop just above it. If med area% collapses as you lower the threshold, the extra detections are specks - raise a minimum-area filter instead. If empty stays high at every threshold, your prompt is wrong and no threshold will save it. (The mask threshold can't be swept this way - it changes pixels, not scores.)

5. Small export things that cost me an hour each

  • pycocotools.mask.encode() needs np.asfortranarray(). Pass a C-ordered array and you get a silently transposed mask. No error.

  • The RLE counts field is bytes; json.dumps refuses it. Decode to ASCII.

  • For YOLO, write an empty .txt for images with no detections. Missing file = missing data; empty file = confirmed negative, which is how the model learns not to hallucinate.

6. Look at the labels

Auto-labelling fails quietly - no exceptions, no bad metrics, just a pallet prompt that's been segmenting the wooden floor for 12,000 images. Render a contact sheet of overlays sorted lowest confidence first and actually look at it. Ten seconds catches what an aggregate metric won't.

That's it. Hopefully I saved you guys some time and feel free to ask questions!

UPDATE: since I got a couple of similar questions about the auto-labelling pipeline in my DMs, I posted a full write up of it here . If you are curious about how to get the best results when auto-labelling - feel free to check it out.


r/computervision • • May 28 '26

Showcase I made a mobile app to annotate polygons. Now you can label your dataset on the beach

116 Upvotes

Hi,

I built a mobile app to annotate polygons with your smartphone and export directly to LabelMe format.

The app is ready, but not on the Play Store yet. Before I go through the hassle and fees of publishing it, I want to see if people would actually use this.


r/computervision • • Jan 10 '26

Showcase Lightweight 2D gaze regression model (0.6M params, MobileNetV3)

115 Upvotes

Built a lightweight gaze estimation model for near-eye camera setups (think VR headsets, driver monitoring, eye trackers).

GitHub: https://github.com/jtlicardo/teyed-gaze-regression


r/computervision • • Apr 13 '23

Discussion Segment anything in an image using SAM

115 Upvotes

r/computervision • • Jul 11 '22

Discussion Text2LIVE - Text driven neural video editing

115 Upvotes

r/computervision • • Oct 02 '25

Showcase I turned a hotel room at HILTON ISTANBUL into 3D using the VGGT model!

114 Upvotes

r/computervision • • Nov 27 '24

Showcase Person Pixelizer [OpenCV, C++, Emscripten]

114 Upvotes

r/computervision • • Mar 23 '23

Showcase Learn how to label faster using model-assisted labeling | YOLOv8

114 Upvotes

r/computervision • • May 12 '21

Research Publication Enhancing Photorealism Enhancement (making GTA V more realistic)

Thumbnail
youtube.com
114 Upvotes

r/computervision • • Aug 02 '20

AI/ML/DL Two clownfish tracked via instance segmentation in an underwater camera

114 Upvotes

r/computervision • • May 23 '26

Showcase Reprojection - The future is calibrated!

113 Upvotes

Hello!

I want to share an open source camera calibration repository I have been building, you can find it here github.com/reprojection-calibration/reprojection.

My goal is to provide the same capabilities as the excellent but unmaintained Kalibr. It is not done yet, but it already can do intrinsic camera calibration from ROS1, ROS2, or MP4 videos. Camera-imu extrinsic calibration and stereo calibration are coming soon.

I hope some of you can appreciate this and give it a chance if you need to calibrate a camera. I would love feedback or tips from anyone that has an opinion. In the video you can see the dashboard I built to view results from the calibration process. Nothing is 100% done yet, but I am ready for some feedback :)

Thanks!


r/computervision • • Mar 17 '26

Showcase autoresearch on CIFAR-10

Post image
113 Upvotes

Karpathy recently released autoresearch, one of the trending repositories right now. The idea is to have an LLM autonomously iterate on a training script for better performance. His setup runs on H100s and targets a well optimized LLM pretraining code. I ported it to work on CIFAR-10 with the original ResNet-20 so it runs on any GPU and should have a lot to improve.

The setup

Instead of defining a hyperparameter search space, you write a program.md that tells the agent what it can and can't touch (it mostly sticks to that, I caught it cheating by looking a result file that remained in the folder), how to log results, when to keep or discard a run. The agent then loops forever: modify code → run → record → keep or revert.

The only knobs you control: which LLM, what program.md, and the per-experiment time budget.

I used Claude Opus 4.6, tried 1-min and 5-min training budgets, and compared a hand-crafted program.md vs one auto-generated by Claude.

Results

All four configurations beat the ResNet-20 baseline (91.89%, equivalent to ~8.5 min of training):

ConfigBest acc
1-min, hand-crafted91.36%
1-min, auto-generated92.10%
5-min, hand-crafted92.28%
5-min, auto-generated95.39%

All setups were better than the original ResNet-20, which is expected given how well-represented this task is on the internet. Though a bit harder to digest is that my hand-crafted program.md lost :/.

What Claude actually tried, roughly in order

  1. Replace MultiStepLR with CosineAnnealingLR or OneCycleLR. This requires predicting the number of epochs, which it sometimes got wrong on the 1-min budget

  2. Throughput improvements: larger batch size, torch.compile, bfloat16

  3. Data augmentation: Cutout first, then Mixup and TrivialAugmentWide later

  4. Architecture tweaks: 1x1 conv on skip connections, ReLU → SiLU/GeLU. It stayed ResNet-shaped throughout, probably anchored by the README mentioning ResNet-20

  5. Optimizer swap to AdamW. Consistently worse than SGD

  6. Label smoothing. Worked every time

Nothing exotic or breakthrough. Sensible, effective.

Working with the agent

After 70–90 experiments (~8h for the 5-min budget) the model stops looping and generates a summary instead. LLMs are trained to conclude, not run forever. A nudge gets it going again but a proper fix would be a wrapper script.

It also gives up on ideas quickly — 2–3 tries and it moves on. If you explicitly prompt it to keep pushing, it'll run 10+ variations before asking for feedback. It also won't go to the internet for ideas unless prompted, despite that being allowed in the program.md.

Repo

Full search logs, results, and the baseline code are in the repo: github.com/GuillaumeErhard/autoresearch-cifar10

Happy to answer questions about the setup or what worked / didn't and especially if you also tried it on another CV task.


r/computervision • • Dec 06 '23

Discussion OpenCV calls for help

113 Upvotes

The below is a direct copy+paste from Satya Mallick's LinkedIn post.

With the help of 500+ backers OpenCV has raised $48,164.

First, I want to thank all our backers for their generous donation. Every contribution helps.

Second, the campaign is performing far below our expectations. In our earlier campaigns for commercial products (OpenCV Courses, OpenCV AI Kit etc.) we raised $50k in less than 10 minutes.

And yet, the campaign for the library that runs the computer vision infrastructure of the world, is failing.

We are at <10% of the $500,000 we need to raise after 27 days!

https://www.indiegogo.com/projects/opencv-5-support-non-profit-open-source-cv-ai

We estimate, the number of OpenCV developers is between 5-10M worldwide if not more.

The computer vision and AI community is also a pretty rich with engineers making 30-40% more than other branches of engineering.

Why are we so stingy? Why can't we have nice things?

We still have 18 days to go, and I urge the community to chip in. Help us keep OpenCV FREE for commercial use.

The numbers may not be up-to-date, but I found this cry worth sharing. OpenCV is what's empowering the CV world, and should be kept alive.


r/computervision • • Apr 13 '23

Showcase If you are looking for resources to learn how to use the Segment Anything Model (SAM), I created a comprehensive Google Colab | Link in the comment

Thumbnail
gallery
113 Upvotes

r/computervision • • Mar 28 '23

Discussion Gpt4 has actually blown my mind

113 Upvotes

So, I just started a new job as new grad as an AI dev in computer vision systems. I do some research, try to find out what's new so I can replace the "old" models.

Recently I crossed an article that implemented a new loss function for a specific segmentation task. Now since before this job I used keras/tf, I'm not used to PyTorch and I decided to pay chatGPT plus to get access to gpt4 and help me with PyTorch and other stuff.

Here's the deal:

I read the article, I understood it, and now I had to implement the customized loss function. Problem: never done it in PyTorch, so it would probably take a few days to do it, considering all the bugs I would have, etc.

Now this is the really fun part:

I got a bit tired of reading and searching for custom implementations that I could adapt, so I just copy pasted the article session about it in chatGPT (gpt4). I didn't even try to format the equations that were present in the article, I just copied, pasted, and asked what he understood. It got everything mostly right, so I asked it to write the code.

Well... it did. All the code. I just specified what arguments and user defined variables I wanted. It translated the copy pasta section of the article into functioning code, handling all the specific problematic cases.

I know this might not sound amazing given all the amazing examples already posted on twitter and Reddit, but I've been using it for a few days now, and this is probably the most productive thing it did for me.


r/computervision • • Sep 23 '26

Showcase I made a computer vision tool for gym form analysis

112 Upvotes

It runs entirely in the browser with MediaPipe Pose Landmarker at about 30 - 60 fps. Everything above the model is geometry.

Prop the phone up, pick an exercise, and it turns the skeleton red and beeps when a rule breaks. It also counts reps and sets with a state machine on one trigger metric per exercise.

Exercises are declarative profiles, a trigger metric for reps, rules with min and max, phase gating. Only four so far have been implemented.

Deadlift: torso angle from horizontal (catches hips shooting up), ear-shoulder-hip angle as a spine-neutrality proxy (no mid-spine landmark exists), wrist-to-ankle offset in torso lengths as a bar path proxy.

Lat pulldown: torso lean limit, elbow angle as the rep trigger.

Bench press: forearm tilt from vertical, so wrists stay stacked over elbows.

Biceps curl: upper arm tilt from vertical (detects elbow drift) and torso angle (avoid swinging)

Here is the link if you want to try it out.

Make sure you switch on screen recording if you want to capture your form and range.


r/computervision • • Jul 17 '24

Help: Project I want to test my inference model. Anyone up for a live Rock, Paper, Scissors?

112 Upvotes

r/computervision • • Apr 27 '24

Research Publication This optical illusion led me to develop a novel AI method to detect and track moving objects.

112 Upvotes

r/computervision • • Oct 01 '18

Mask R-CNN using OpenCV (C++/Python)

112 Upvotes

r/computervision • • May 30 '18

Pose Estimation with cv2.dnn module. Link to tutorial in the comments.

112 Upvotes

r/computervision • • Aug 28 '23

Help: Project Calculating ball trajectory in 3D from 2D tracking

111 Upvotes

r/computervision • • Jun 22 '20

PSA Univ. Michigan 2019 Deep Learning for Computer Vision lectures are publically available! — 16-week course instructed by Justin Johnson

111 Upvotes

http://leccap.engin.umich.edu/leccap/site/jhygcph151x25gjj1f0

I followed his cs231n lectures from a few years ago and these look to have many interesting updates, particularly towards the end of the course on 3D, videos, and other special topics! He was certainly one of the top lecturers I've seen in on computer vision, so I'm excited to see he's shared more publically!


r/computervision • • Jan 25 '26

Help: Project Ultralytics alternative (libreyolo)

110 Upvotes

Hello, I created libreyolo as an ultralytics alternative. It is MIT licensed. If somebody is interested I would appreciate some ideas / feedback.

It has a similar API to ultralytics so that people are familiar with it.

If you are busy, please simply star the repo, that is the easiest way of supporting the project: https://github.com/LibreYOLO/libreyolo

The website is: libreyolo.com

EDIT: it now supports YOLO9, RF-DETR, YOLOX, DFINE, DEIM, RT-DETRv1/v2/v4, PicoDet, RTMDet, EdgeCrafter, MobileNetV4, ConvNext, EfficientNetV2, ResNet, L2CS and much more. It support object detection, oriented bounding boxes, segmentation, point localization, semantic segmentation, depth estimation and semantic segmentation.