r/computervision • • 6d ago

Discussion 80 downloads on my tiny vision model so i made v1.0, now it lets claude “watch” videos (36M params, runs on laptop cpu)

3 Upvotes

so few days back i posted my tiny vision model that i built just for learning (v0.1), and 80 people downloaded it on huggingface which honestly shocked me lol. people in comments gave really good feedback so i actually worked on all of it, and now v1.0 is out.

main thing: claude (and many other assistants) can look at images but cant open a video file. so tiny-vision runs locally next to it, breaks the video into scenes and gives the assistant a scene by scene breakdown. then you just ask “what happens in this video” and it actually answers. nothing gets uploaded, all on your machine. i tested it with a 10-15 min youtube video and it still works fine.

works through MCP so it runs in claude desktop and claude code (tested both), and should work in cursor, vs code, lm studio etc (havent tested those yet). if your app dont have MCP you can just pipe the text into ollama or paste it anywhere.

what changed from v0.1 (thanks to the comments):

  • someone said the “a man in a blue shirt” thing is probably the encoder not the decoder. i tested it and yaar they were right. my from-scratch encoder only saw 29k images, so i switched to a frozen pretrained DINOv2-small (meta’s) and trained the adapter + decoder myself (14M params) on COCO
  • it picks frames on scene changes now instead of one every 2 sec, like someone suggested. so the timestamps land on the actual cuts
  • real benchmarks this time, not vibes

numbers (COCO test):

  • v0.1: CIDEr 0.06 💀
  • v1.0: CIDEr 1.16

vs florence-2-base (231M) on the same 1000 images:

  • ~89% of its caption score
  • 6x smaller
  • 8x faster on gpu
  • 75x faster on cpu (54ms per image vs 4 sec)

not saying its better than florence, its not. it just does a lot with very little.

honest stuff:

  • encoder isnt mine anymore, its DINOv2. i tried my own and it just cant compete without millions of images
  • no audio yet, so it describes what it sees, not what is said. speech is coming next
  • captions are COCO style, so no OCR, no names, no counting
  • and like last time, i took a lot of help from claude to build this, so its not entirely mine

previous post: https://www.reddit.com/r/computervision/comments/1xyuaia/built_a_tiny_vision_model_from_scratch_just_for/
code: https://github.com/amar683/tiny-vision
model: https://huggingface.co/amartomar683/tiny-vision

anything you want me to try next? still learning so all feedback welcome


r/computervision • • 6d ago

Showcase Real-world inference benchmarks: Linux CUDA EP vs Windows DirectML on mobile GTX 1650 Ti (i5-10300H)

2 Upvotes

Lobo-to-lobo comparison on the same serviced laptop hardware (Intel i5-10300H + discrete mobile GTX 1650 Ti with GDDR6). Bypassing heavy Python dependencies via a lightweight native C-API pipeline.

The Pipeline:

  1. Frame capture to RAM (NV12 format).
  2. Localized detection: YOLOX-nano (640x640) inside a targeted 3x3 control zone. Pure FP32 to ensure bounding box geometry stability.
  3. Feature extraction: 256x256 ROI crop processed for 44 distinct texture/geometry metrics.
  4. Classification: Downstream CPU-bound LightGBM classifier evaluating extracted features.

Key Technical Outcomes (Part 6): Windows 11 + DirectML backend: Hitting a stable 106–111 FPS (~5.0 ms inference latency). Standard DX12 compute shader translation introduces slight frame-pacing variance (t_max up to 11 ms). Linux + Native NVIDIA CUDA EP backend: Delivering a constant 114–116 FPS (~4.1 ms inference latency) with a strictly bounded t_max limit. Shifting from DirectML to the native CUDA driver layer reduces raw execution overhead on the Turing architecture. Preprocessing overhead: Isolated at 1.5–2.2 ms inside OS threads, remaining consistent across both environments.

https://medium.com/@olesha-ai/bypassing-the-avx2-tax-part-6-same-hp-on-linux-cuda-wins-again-db4c95673a2a

Best regards.

olesha-ai


r/computervision • • 7d ago Bravo

Showcase My iPhone filmed our amateur football match by itself

1.2k Upvotes

A fine-tuned ball detector + players decide where to look, a cheap gimbal moves the camera

I play amateur football, and nobody ever wants to stand behind the camera. So I made my iPhone do it, on a simple phone stabilizer, the kind people use for vlogs (mine is a DJI Osmo Mobile 8P, €159: https://www.dji.com/osmo-mobile-8p):

  1. Find the ball: YOLO26s fine-tuned on amateur footage, where the ball is often under 16 px, at night.
  2. Pick where to film: a hybrid rule follows the ball, and the players when the ball is hidden.
  3. Move the camera: the phone drives the gimbal's motors, like a cameraman panning.

All on the phone, about 30 times a second. This clip is from our match last Wednesday.

I've made the model, the dataset and the training code open source:

On a match the model never saw, fine-tuning takes it from 51 to 99 balls found out of 219. Tiny balls are still hard (under half are found), which is why the players matter. The app itself is still in development.

Tell me what you think, and if you'd like to get involved, I'd be glad to hear from you!

Edit: thanks for all the questions about the app! I’ve open-sourced it too: https://github.com/Thibault-GILLARD/box2boxcam-ios (gimbal control over DockKit, the real-time Core ML pipeline, the camera logic). It’s still in development, and my bottleneck is testing on real matches, so feedback from anyone who films a game with it would be gold.

Instagram account where there will probably be videos filmed with it : https://www.instagram.com/loumistraufc/


r/computervision • • 6d ago

Discussion Real-time alternatives to YOLO for detecting human-like figures in live video? (Desktop & Laptop GPUs & CPUs/TensorRT/low latency)

6 Upvotes

I'm interested in moving beyond traditional YOLO versions (v8/11/26) and investigating alternatives for real-time detection of human like figures in a live video stream (high framerates).

What I'm trying to detect: Human-like figures (various shapes, often in outfit/equipment, and in scenes that could be stylized/videos rather than very conventional CCTV footage)

Real-time requirements: Ideally, I'd want to get sub-5ms or sub-10ms inference times on desktop CPUs/GPUs (at 960x960, 640x640, 320x320 resolution)

Deployment requirements: Can export to ONNX format easily and deploy to NVIDIA TensorRT (with some degree of stability in, say, FP16 or FP8 quantization and without getting bogged down in custom plugins)

Primary challenges that I'd like to address:

- Heavy partial occlusions (only part of a figure's head/shoulder/torso may be visible)

- Rapid camera pans and motion blur

- Bounding box jitter between frames in a video stream

- Detecting small, distant figures that grow rapidly

I've been tinkering with NMS-free real-time transformers such as RF-DETR, D-FINE, DEIMv2, RT-DETRv2 and RT-DETRv4, as well as single-stage human/pose/keypoint detectors such as RTMO or EdgeCrafter.

For those of you using other detectors (other than YOLO variants) in production for live video streams:

- What's the best tradeoff you've experienced in terms of real-world inference latency (TensorRT or CPU) vs detection performance (i.e., recall) for human(-like) figures in presence of occlusions?

- How bad are the ONNX export and TensorRT FP16/FP8 quantization experiences for other detectors (compared to CNNs)?

- Should I adopt a simple single-stage pose/keypoint detector instead for better localization in cases with occlusions? Or is a fine-tuned DETR-like model still the way to go?

- Any insights, benchmarks, repo links, or TensorRT deployment experiences you can share?


r/computervision • • 6d ago

Help: Project Removing light lettering from a colored ribbon after OCR: how would you make the glyph mask more reliable?

1 Upvotes
The full editor after OCR, tracing and text reconstruction. The selected title is a live text object.

I’m testing editable text recovery on a flattened 1122 × 1402 Korean festival poster shared by Design Company Eun. EasyOCR gives me line boxes and text. In this case it found six regions, misread a venue character and missed a hand-lettered headline that I boxed manually. The question is about the pixel mask after the line is known.

In a padded crop around pale lettering on a red banner, a lightness threshold can include pale background outside the banner. My fallback runs Otsu on grayscale, splits the light pixels into 8-connected components, and drops components touching the padded crop boundary. I intersect the result with the approved text box, dilate the mask slightly and run OpenCV Telea inpaint. This kept the pale exterior out in that sample. The crop-boundary rule can discard a genuine stroke, and textured edges can leave visible residue.

Downstream, VTracer WASM traces the cleaned art. I render candidate fonts at the fitted size in Canvas 2D and score their mask overlap and aspect ratio. The renderer then restores actual editable text. ClusterGlyph and Distill-SVG were references for the pipeline design.

Would you start with a local Lab foreground/background color model seeded inside the OCR box or a learned text matte for this failure mode? I’m especially interested in evaluating anti-aliased edges when the only original is a flattened JPEG.


r/computervision • • 6d ago

Help: Theory help me!!!monocular depth estimation

0 Upvotes

我正在寻找一个想法,以解决在包含透明物体的场景中进行单眼深度估计所面临的挑战,并希望将其发展成一个研究项目。你有什么建议吗?


r/computervision • • 7d ago

Showcase I taught my phone to count my reps and catch bad form

24 Upvotes

I’ve been building Repchek, a web app that counts reps and checks exercise form using your phone camera.

It runs entirely in the browser using MediaPipe.

A few things I learnt while building it:

My initial assumptions about joint angles were wrong. Real movements don’t always match what you expect, so I built a debug mode to record and analyse metrics from actual workout sessions.

Pose detection struggles with occlusion. For example, during push-ups, shoulders can appear closer together and wrists can disappear. I had to account for this using measurements captured at the start of a set.

Tracking the biggest person in the frame doesn’t always work. In a busy gym, that person might be the spotter. I added logic to identify and follow the person actually exercising.

Counting reps before someone is in position creates false positives. A readiness check helped solve this.

Repchek currently supports 13 exercises, including holds like planks and stretches.

Some limitations I’m still working on:
- Handling occlusion more reliably.
- Personalizing thresholds for different users.
- Testing newer exercises with real workout footage.

I’d appreciate feedback, especially from anyone who’s worked with pose estimation models.

GitHub: https://github.com/frankndungu/repchek
Try it live: https://repchek.fit


r/computervision • • 6d ago

Discussion If someone can help as mentor, or buddy that would be awesome

6 Upvotes

Looking for someone perhaps bachelor degree or master in AI who is willing to connect one hour per week to go through computer vision.I am following this book: Szeliski, R. (2022). Computer Vision: Algorithms and Applications, 2nd ed. Springer.

Need some coaching or some buddy to study together, any expert or someone who is studying and can hep


r/computervision • • 6d ago

Help: Project Looking to connect with Computer Vision researchers and professors

8 Upvotes

I'm exploring Computer Vision, particularly Visual SLAM, 3D perception and reconstruction, through research-oriented projects and open-source contributions OpenCV and Kornia.

Looking to connect with professors, researchers, PhD students and research groups working in these areas for potential research collaborations, contributing to ongoing projects or exchanging ideas.

I bring a software engineering background and hands on experience building and experimenting with these systems. Also open to research guidance from people in the field.

If you're working in this space, I'd be glad to connect.


r/computervision • • 6d ago

Discussion [D] What the Hell is going on at ICLR this year?

Thumbnail reddit.com
0 Upvotes

r/computervision • • 6d ago

Help: Theory Prof explains and I don’t get it

0 Upvotes

Lecturer explaining resnet, vggnet, googlelenet and alexnet in cnn class.

I have no clue what is that ? I am concentrating 100% and still can’t catch up.

And how resnet is better than human being ?

And what is convolution is local connection plus weight sharing ? What does this mean

And what is the inductive bias : translation equivalent


r/computervision • • 6d ago

Research Publication Hierarchical detection of neonatal brain pathologies using a two-stage deep learning framework from magnetic resonance imaging

Thumbnail
frontiersin.org
1 Upvotes

r/computervision • • 6d ago

Help: Theory Synthetic Data for Sim-to-Real Gap

2 Upvotes

Hi All,

So, I've been scratching my head for a week or so now on this problem. I need to predict certain pose estimates from an image.

The issues is that there is very limited real world data. But, I have very large synthetic datasets. I have tried a multitude of techniques, but keep coming back to the same problem, real world pose estimation is HORRIBLE, like as bad as the mean. Meanwhile, another synthetic dataset (different configurations) has like 98% accuracy.

To alleviate this, I've been following a paper from Microsoft: https://arxiv.org/pdf/1909.06993, where they use a cross-modal variation autoencoder with latent space constraints.

I literally have been using the same architecturs, but it is just doing rubbish on real world data. They claim that they are able to generalise very well, which can be seen from one of the latter images.

So, anyone know where I could be going wrong? Is there genuinely a problem in my pipeline? Or does it happen that their dataset works better for their task? I think their results are truthful.

Any help would be really appreciated as this is incredibly frustrating! Thanks!


r/computervision • • 7d ago

Discussion after tiny vision, i wanted to see if i can build a tiny language model from scratch too (36M, NCM paper, trained on macbook) 😅

3 Upvotes

so few days back i posted my tiny vision model here(https://huggingface.co/amartomar683/tiny-vision-flickr8k) and you guys actually checked it out, its at 74 downloads now 😅 thanks for that. after that one worked (kinda), i started wondering what else i can build from scratch on my mac, and a language model was the obvious next thing to try.

i was reading the Next-Concept Modeling (NCM) paper by Kumbong, Khare et al. (Stanford / Together AI, arXiv:2610.14162) and the idea really clicked for me. normal llms write one token at a time, but in NCM a VQ-VAE turns text into levels of codes, coarse to fine, and the model fills one full level at once. so i decided to build it myself from the paper, just to understand how it works from inside. all credit for the idea goes to them, i just implemented my own version.

its called tiny-ncm. its around 36M params (21M generator + 15M VQ tokenizer), trained completely from scratch, no pretrained weights. same macbook pro m5, but this time it took like 12 hours total instead of 42 min 💀

basic idea:

text → split in 32-token blocks → each block made coarse to fine in 5 levels (2 → 4 → 8 → 16 → 32 codes) → 6 passes per block instead of 32

i trained it as a small daily assistant. alarms, reminders, timers, calendar, gmail (read only), weather, notes, web search, simple maths and little bit of small talk. there is a --show-levels flag which shows each block going from rough guess to final text, honestly this was the most satisfying part:

level 1: Hello! How can I help you today?
level 3: Hello Jordan, How I I you you today today?
level 5: Good morning! What can I do for you today?

some honest stuff:

  • it picks the right action most of time, but copying details is very bad. “London” became “Singapore”, “5pm” became “5pmpm”, “23 times 47” became 23*10 😂 cause all codes in a level are predicted same time, so two positions can both write the same word.
  • so i added app-side checks that fix the tool arguments using your actual words. with checks it gets 490/500 on my test set, but model alone gets every detail right only around half the time. so ya, the checks are doing lot of the work tbh.
  • training longer on same data didn’t help. what helped was making the data copy-focused, with new random names and times in every example so it cant just memorise. same lesson as tiny-vision (“a man in a blue shirt” for everything lol).
  • i tried fine-tuning it to summarise web results also. it learned the format but wrote gibberish inside it (“Stir in cheeseaksil sl fresh biil” 😭), so i reverted it.
  • no coding, no multi-step maths. “8 slices, 3 friends eat 2 each” and its gone.

random thing i learned on mac (MPS):

  • attention was the main bottleneck. letting each level only look at the last 128 tokens of context made training around 2x faster.
  • bf16 matmul was way faster than fp32 on MPS (~15 vs ~3.4 TFLOPS in my test).
  • manual attention was again faster than pytorch’s sdpa for small sizes, same as tiny-vision.

next i am thinking to export it to onnx so it can run on phone also, and maybe connect tiny-vision with it. lets see what will happened.

code: https://github.com/amar683/tiny-ncm
model: https://huggingface.co/amartomar683/tiny-ncm

would love any feedback or tips, especially if someone played with NCM or coarse-to-fine text models


r/computervision • • 7d ago

Discussion Master's + industry experience vs. PhD for computer vision and AI research careers?

25 Upvotes

Hi everyone,

I'm currently pursuing a research-based master's degree in computer vision and have the opportunity to transition directly (Direct PhD) into a funded PhD.

I'm trying to decide between two paths:

Option A: Complete my master's and enter industry earlier, focusing on computer vision, 3D perception, robotics or research engineering.

Option B: Continue into a PhD, spend approximately two additional years developing a stronger research portfolio, and potentially pursue an industry research internship before graduating.

My ultimate goal is industry rather than academia. I'm particularly interested in advanced ML engineering, research engineering and potentially industrial research-scientist positions.

I'm curious about how hiring managers and experienced engineers evaluate these two profiles.

For people working in CV/ML research or engineering:

  1. Does a PhD provide a significant advantage for advanced computer-vision or research-engineering positions?
  2. Would you generally value a PhD with strong research publications more than a master's followed by two years of relevant industry experience?
  3. Have you encountered career limitations from not having a PhD?

I'd especially appreciate perspectives from people who have worked in industrial research or been involved in hiring.

Thanks!


r/computervision • • 7d ago

Showcase Jump rope world record analysis

24 Upvotes

Custom model for jump/rope tracking and counting + 3d pose estimation

Source: https://www.instagram.com/reel/DfvMgX2vNNi/


r/computervision • • 7d ago

Discussion A Cool GUI for CV pipeline with GStreamer

16 Upvotes

Hi cvisioners. I am CV freelancer. I made a wrapper program for faster CV pipeline prototyping, optimization, and launching with GStreamer, and then Claude visualized it. I pushed it this repo.

I thought that this can also useful for this community, especiallly beginners.

I am wondering your opinions too.

Best.


r/computervision • • 7d ago

Help: Project Any recommendations for carefully curated datasets for validation and benchmarking?

1 Upvotes

Recently I’ve been testing VLMs for auto-labeling (you might have seen my Qwen3-VL-2B or Qwen3-VL-2B vs 235B posts here).

So far, I have two main use cases:

  • Quick validation before larger runs, to check the model and configuration.
  • Benchmarking models on accuracy, output reliability, latency, and cost.

I started with datasets that were easy to download and integrate. Now that the project is taking shape, I’m running into some limitations:

TaskCurrent datasetLimitations
ClassificationCIFAR-10Tiny 32×32 images; only 10 classes.
DetectionCOCO128Just 128 images from COCO’s training set; potential pretraining overlap.
GroundingRefCOCOgLimited testing of missing targets or ambiguity.
AttributesOVADMy adaptation uses 22 categorical groups, making it narrower than the original benchmark.
VQAVQA v2Limited coverage of OCR, documents, and unanswerable questions.
CaptioningCOCO CaptionsShort references and overlap metrics can penalize valid descriptions and miss factual errors.

I’m looking for datasets—or curated subsets—that are:

  • General-purpose, rather than focused on a specific domain.
  • Small but diverse. My budget currently allows 100 fixed samples per task, so even 1,000 carefully selected examples per task would be plenty.
  • Usable at moderate image resolutions, since inference cost matters.
  • Publicly available with clear licenses.

Basically, I’d love a small, thoughtfully selected evaluation set where the examples cover a useful range of cases. Recommendations for individual tasks are very welcome; it doesn’t need to be one dataset covering everything.

I may end up handpicking the subsets myself, but before doing that let me know if there is any existing datasets or curation efforts worth looking at?


r/computervision • • 7d ago

Showcase LeanScene: Beating TransNet V2's shot detection benchmarks with a 1.6MB model (115x fewer ops, 2,522 FPS on Mac GPU)

6 Upvotes

I built LeanScene to index thousands of hours of video locally on a MacBook Pro.

Because it’s so lightweight, LeanScene runs completely client-side in the browser. The demo chains it with MobileCLIP to split long videos into shots and make them searchable by text, a full video indexing pipeline running locally with no server backend.

Standard shot transition detectors like TransNet V2 run 3D convolutions over overlapping windows of frames. That gets expensive fast and TransNet V2's PyTorch port doesn't run on Apple's MPS backend, leaving it at 152 FPS end-to-end on CPU.

Instead of 3D convolutions, LeanScene encodes each 100x100 frame once with a 4-layer 2D CNN alongside two simple pixel descriptors (a 64-bin joint RGB histogram and an 8x8 color thumbnail). A dilated 1D network (63-frame receptive field) then labels each frame as same, cut, or fade using those features and their explicit frame-to-frame differences.

A few numbers:

- Size & compute: 0.39M parameters (1.6 MB), 7.2M MACs/frame (115x fewer than TransNet V2)

- Speed (Apple M1 Pro): 5,171 FPS model-only on GPU (2,522 FPS end-to-end including video decoding and resizing); 1,000–2,091 FPS model-only on CPU

- Accuracy (5-seed mean F1 vs. TransNet V2): 97.4 vs. 96.1 on BBC Planet Earth, 79.1 vs. 77.7 on ClipShots, and 93.7 vs. 92.6 on RAI

Interestingly, scaling the 2D encoder up to 4x wider barely changed accuracy, most of the gains came from mining the model's false alarms on real footage and masking out high-confidence predictions so unannotated transitions weren't penalized as negatives.

Live browser demo:
https://lucasjackson.dev/leanscene/

Code, weights, and evaluation scripts:
https://github.com/lucasjacks0n/LeanScene

Would love to hear how it handles any tricky edits, flashes, or dissolves you throw at the demo.


r/computervision • • 8d ago

Showcase 2-axis gimbal. Solo engineered. Master's thesis.

816 Upvotes

I'm building a 2-axis gimbal with a visible and a thermal camera for a small fixed-wing drone, as my master's thesis. The clip is the CAD model: on the left the gimbal as it looks, on the right the same unit with the housing made see-through, doing the same moves.

I'm posting here because the mechanics are mostly settled and the vision side is where I'd like input before I freeze the hardware.

What the cameras get from the gimbal:

  • Two cameras in a 67 mm ball, one above the other: a 5 MP visible camera and a 256×192 thermal camera, both arriving over USB
  • Two axes, roll and tilt: ±100° in roll, and from 25° up to 95° down in tilt
  • A magnetic encoder on each axis and two IMUs, one in the ball and one in the base, so the pointing angles are known at any time
  • Around 187 g for the whole nose

Two things I already know will matter for the image processing:

  • There is no pan axis. To look sideways the ball rolls and then tilts, so the picture rotates with the roll angle and has to be turned back in software.
  • The two lenses don't share an optical axis, and the thermal image is far lower in resolution, so lining up thermal and visible pixels will need calibration.

Questions for anyone who has worked with visible and thermal pairs, or with cameras on gimbals:

  • Is there something you wish the hardware had given you? Frame timestamps tied to the IMU, a sync line between the two cameras etc...
  • For registering thermal to visible at this resolution is a fixed calibration enough at long range or do you end up correcting per scene?

Thx!
- Amine Mehdi M.


r/computervision • • 7d ago

Discussion Same pages, same blur: why did two OCR engines react so differently?

0 Upvotes

I’m a co-founder at GritWorks. We ran a small Docling CPU OCR experiment on 14 synthetic Latin-script pages (291 fields per condition). We blurred copies of the same pages and kept the expected values fixed. Field exact match went from 70.5% to 4.8% for EasyOCR and from 98.6% to 93.1% for RapidOCR. That’s one simulated blur setting, not a ranking of OCR engines or a test of real phone photos.

One thing I’d check before blaming recognition: the confidence filter. On a separate four-page check, lowering EasyOCR’s threshold from 0.5 to 0 cut blur character error rate from 81% to 28%. Small sample, but it’s a reason to inspect what the pipeline drops before comparing engines.

When you test blur, do you hold the confidence threshold fixed, or tune it per engine and compare at the same coverage?


r/computervision • • 8d ago

Showcase I made a 3D human mesh reconstruction & frame-sync web app for sports analysis

207 Upvotes

Technical stack info I can share about the 3D pipeline (works on regular handheld videos):

Bounding Box & Target Tracking: MediaPipe JS library running in the browser for lightweight 2D pose tracking, used primarily for accurate automated cropping and keeping the subject centered for downstream processing. 

3D Mesh Recovery: A specialized 3D reconstruction model optimized for video sequences (operating on the cropped sequence), combined with a custom gravity and Inverse Kinematics (IK) pipeline to lock world orientation and adapt ground contact constraints. I use Meta’s MHR for the body model for an efficient body mesh model.

Temporal Alignment: Fast approximate Dynamic Time Warping (DTW) to handle frame synchronization across movements with different tempos/speeds.

Rendering: Three.js for 3D rendering. Activeframe for fast video scrubbing.

You can try it out for free at twinreplay.com with your own clips or check out the built-in interactive demos.

Would love to hear your thoughts or feedback.


r/computervision • • 8d ago

Discussion Why my 97% accuracy parasite detector failed on unseen microscopy images (Lessons from domain shift, tiling, and negative scaling)

Thumbnail
gallery
6 Upvotes

Hey everyone,

A year ago, I decided to transition from web development into ML/CV. Instead of doing standard MNIST/COCO tutorials, I picked a real-world problem close to home: I have guinea pigs, and taking them to the vet for fecal exams is a slow, tedious process.

My goal is to build an assistive CV tool for vet lab technicians—something that scans microscope slides and highlights suspicious regions (with an eventual goal of exporting to ONNX for edge cameras).

For v1, I grabbed all the public datasets I could find (Chula, HEMIC, AI4NTD) and built a two-stage cascade (a fast binary detector to find parasite-like objects, followed by a fine-grained species classifier). On paper, the metrics looked great. In reality, the model completely fell apart on unseen data.

Here are the 4 biggest engineering traps I hit and what the numbers actually looked like:

  1. High intra-dataset metrics mean nothing across sources
  • On cropped objects from the Chula dataset, my classifier hit 97–98% accuracy.
  • When I ran the full cascade on unseen full-frame images from HEMIC, spatial detection worked fine (found 41/42 eggs), but species classification dropped to 66.7% (28/42).
  • Even worse: a model trained on AI4NTD P1.5 got 97.43% recall on its own test set, but scored 0/114 on P3, 0/12 on HEMIC Ascaris, and 8/37 on Chula. Differences in lighting, slide prep, and camera sensors caused massive domain shift.
  1. The "Closed-World" trap on empty frames

In an early contour-based cascade, I tested the pipeline on 1,003 completely negative (uninfected) HEMIC frames. It hallucinated at least one parasite on 558 of them.
Why? Because the downstream classifier was forced to pick 1 of 11 parasite species—it had no "debris / air bubble / unknown" rejection path. Any false positive from stage 1 automatically became a confident diagnosis.

3. Tiling isn't optional for microscopy

Resizing a high-res microscope frame down to standard model input sizes destroys small eggs (some are barely 30–50px). On the other hand, fixed small crops slice larger eggs (like Ascaris) in half.

  • Full-frame inference recall: 25.82%
  • Inference with tiling: 55.0%
  • Training + inference with multi-scale overlapping tiles (merged back via NMS): 94.76%
  1. Combining public datasets actually made things worse

When I tried merging Chula and HEMIC to fix generalization, false positives spiked. Looking manually at the labels, many public datasets had incomplete annotations (e.g., 5 eggs on a slide, only 2 labeled), which actively punished the model for finding real objects. Plus, most public datasets focus on human parasites, missing key veterinary species.

What already worked & my pivot for v2 (Data-Centric approach)

Through iterative experiments, I found a few things that actually moved the needle before scrapping the old public datasets:

  • Matching negative scale: Earlier, positive examples were cropped into tiles while negative frames were fed as full-res images. Matching the exact tile scale (640x640) for empty negative windows drastically cut down false positives on uninfected slides.
  • Stripping away heavy augmentations: Turning off Mosaic, MixUp, and HSV shifts—and sticking strictly to mild rotations (≤20°), flips, and minor scaling—preserved critical fine textures on small translucent eggs.
  • Domain alignment: Converting everything (both train and inference) to grayscale + CLAHE (clipLimit=2.0, tileGridSize=(8,8)) to normalize local contrast across different microscopes.
  • Strict source-level splitting: Grouping crops by original slide, video, or paper before splitting into train/val/test to prevent silent data leakage from near-duplicate frames.

For v2, I'm building a clean dataset from scratch for 14 veterinary parasite classes (enforcing a ≥80px donor threshold so objects retain detail, while still validating on real 50–80px small targets). Right now, I'm deep in manual annotation—and preparing controlled experiments for mask-based copy-paste synthesis and localized Z-axis defocus blur (applying blur to confirmed hard negatives too, so the model doesn't learn a shortcut like "blurry = egg").

Next up, I'll share the messy reality of scraping microscopy videos for data and testing whether synthetic copy-paste actually improves recall on rare classes.

For those working with medical/microscopy CV: How do you usually handle domain shift across different camera setups, and what's your go-to strategy for hard negative mining on debris and air bubbles?

Note: The attached images are synthetic visual illustrations created to demonstrate the pipeline concepts (false positives on debris, CLAHE contrast normalization, and candidate review UI) without sharing restricted dataset files.


r/computervision • • 7d ago

Help: Theory Update: my 3D golf green looks flat under most lighting. What am I doing wrong?

Post image
1 Upvotes

I made this 3D green from phone video only (no LiDAR, no survey). Same model in all three pics, only the sun position changes.

 Sun intensity 1, ambient light 0.25. The sun starts on the opposite side from the camera, then I rotate it: +90° (pic 1), -90° (pic 2), 180° (pic 3).

 Pics 2 and 3 look flat to me. Pic 1 shows the slope better, but parts of it blow out. My guess is that a low sun from the side works best, but I'd like to hear what you think.

 Where would YOU put the light? Is the ambient too low? Does this look like a real green to you, or does something look off?

 Tell me what's wrong with it, I can take it. Just a hobby experiment, not a surveyed map.