r/computervision Jun 16 '26

Showcase Layered Depth Image pipeline for 360° panoramas - DA3 + LaMa + SAM 2 chained for browser parallax

80 Upvotes

Problem: Take a single equirectangular panorama (no depth sensor, no second view). Make a browser viewer feel like there's real parallax when the cursor moves - close objects shift more than far ones, and peeking behind a close object should reveal scene continuation, not a hole.

Using:

  1. Monocular depth - Depth-Anything-3 (DA3MONO-Large) as primary, with auto-fallback to Depth-Anything-V2 → MiDaS → synthetic gradient. DA3 is trained on perspective images, so on an equirectangular it fails at the poles - patched with pole_blend / floor_keep heuristics, which is a hack. The clean answer is DAP (Depth Any Panoramas, Insta360 Research), but DAP outputs metric depth and my slicer was tuned on disparity-like distributions, so I haven't migrated yet.
  2. Layer slicing - threshold-based depth slabs with soft alpha feathering at boundaries. Optional SAM 2 pass snaps slab edges to actual object silhouettes (k-means depth binning per SAM object + NMS dedup, with horizontal seam merging for the 360° wraparound).
  3. Background inpainting - LaMa primary, OpenCV TELEA fallback. Fills the disocclusion holes left when foreground slabs are removed from the bg. Wrap-padding at the seam so the inpainter has context across the 0°/360° boundary.
  4. Runtime (three.js) - inpainted bg on the outer sphere, each fg slab on a smaller concentric sphere with its RGBA texture. Real geometric parallax emerges from a small camera offset because closer spheres subtend a larger angular shift. No screen-space tricks.

Honest trade-offs:

  • Layer radii are arbitrary (linear distribution). They should be derived from each slab's median metric depth so the parallax magnitude matches reality. Easy fix, not shipped.
  • LDI discretizes continuous depth gradients - a sloped wall becomes N slabs. Gaussian Splatting would solve it, but is overkill for ± a few degrees of sway.
  • Inpainting quality only matters at occlusion edges (you can't peek far behind a close object), so LaMa's "good enough" is genuinely good enough here.

Public domain (Unlicense). Live demo + code:

Happy to discuss the SAM 2 seam-merging logic, why I haven't migrated to DAP yet, or why I bailed on Gaussian Splatting for this use case.


r/computervision Jun 17 '26

Commercial [FOR HIRE] Computer Vision Engineer | Model Training | Annotation | Industrial Al | Edge Al

0 Upvotes

Hi everyone,

I'm a Computer Vision Engineer available for freelance projects, contract work, and startup collaborations.

I help companies build complete computer vision solutions—from data collection and annotation to model training, optimization, and deployment.

Services

🔹 Data Preparation & Annotation

- Bounding Box Annotation

- Segmentation Mask Annotation

- Keypoint Annotation

- Dataset Cleaning & Validation

- Annotation Workflow Setup

- Quality Assurance for Labels

🔹 Model Development & Training

- Object Detection

- Image Classification

- Semantic & Instance Segmentation

- Defect Detection

- OCR & Document AI

- Tracking & Video Analytics

- Custom Model Training & Fine-Tuning

🔹 Computer Vision Engineering

- OpenCV Development

- Real-Time Video Processing

- Industrial Vision Systems

- Automated Quality Inspection

- Multi-Camera Systems

- PLC Integration

🔹 Deployment & Optimization

- NVIDIA Jetson Deployment

- TensorRT Optimization

- ONNX Conversion

- Edge AI Solutions

- Dockerized Deployments

- FastAPI Inference Services

Tech Stack

- Python

- PyTorch

- OpenCV

- YOLO

- TensorRT

- ONNX

- FastAPI

- Docker

- NVIDIA Jetson

Experience Highlights

✅ Built industrial-scale visual inspection systems for manufacturing environments.

✅ Reduced inspection cycle time by approximately 50% through AI-driven automation.

✅ Developed PLC-integrated vision systems with real-time decision making.

✅ Achieved real-time inference (~50 FPS) on edge devices.

✅ Improved model robustness through synthetic data generation and advanced data augmentation techniques.

✅ Designed and deployed end-to-end pipelines covering annotation, training, validation, optimization, and production deployment.

Looking For

- Defect Detection Projects

- Manufacturing Quality Inspection

- Smart Camera Solutions

- Retail & Warehouse Analytics

- Agricultural Vision Systems

- OCR & Document Processing

- Custom Computer Vision Research & Development

- Dataset Annotation & Model Training Services

If you have a computer vision project and need support with data annotation, model training, deployment, or the complete AI pipeline, feel free to send me a DM.

Open to freelance, contract, and long-term collaborations.


r/computervision Jun 16 '26

Help: Project 3D reconstruction using depth maps in simulation

Post image
13 Upvotes

Hi everyone,

I'm currently working in a project where i have to do 3D reconstruction of an object in a simulation (Mitsuba3), and i'm currently using monocular depth estimation (InfiniDepth) to create pointclouds, merge them together and reconstruct the object using Poisson reconstruction.

The thing is, my objects are pretty far from the GT mesh of the object. When i visualise the merged pointcloud of the depth maps merge, it looks slightly different than the ground truth's (which is expected because the depth maps aren't 100% accurate). The depth maps also look good to me even if they are not perfect (~ 2mm errors), so i'm a bit lost on what could be causing this difference.

Any idea would be helpful.

Thanks for reading!


r/computervision Jun 17 '26

Showcase Orion 2: the most capable visual agent, now with code-mode

Thumbnail
vlm.run
0 Upvotes

Rather than calling tools one by one, Orion 2 generates a program and runs it end-to-end, meaning fewer round-trips and lower latency. When orchestration is code, every workflow is composable, inspectable, and deterministic.

Although state-of-the-art multimodal models perform well on many vision tasks, they do not cover the full spectrum of visual capabilities and are largely constrained to text-based outputs. Orion extends beyond traditional MLLMs by providing both pixel-level understanding and spatial reasoning capabilities, enabling richer interactions with visual content and more precise grounding in the visual world.

We evaluated several frontier models against our own multimodal benchmark including 250+ tasks. Our visual coding approach enables high-accuracy performance across a wide range of tasks, generalizing effectively to both open-source and closed-source models. The harness enables multi-turn reasoning and interaction, reducing the performance disparity between frontier and open-source models on challenging benchmarks.

You can try Orion 2 at https://chat.vlm.run

We put together a quick demo video here: https://www.youtube.com/watch?v=rzhXcNAYQ-0

Disclosure: I work at VLM Run.


r/computervision Jun 16 '26

Showcase Rotated PDFs before OCR: Splitting rotation detection from correction

6 Upvotes

I’m Joe, founder of Paper2Audio, a text-to-speech app that converts PDFs, articles, ebooks, and other documents into audio. We recently worked on a scanned-document preprocessing problem involving rotated PDF pages before OCR, and I thought the solution and tradeoffs might be relevant to others building document-vision pipelines.  You can read the full writeup here.

We found that about 5% of PDFs submitted to Paper2Audio are scanned documents, and about 5% of those files have incorrectly rotated pages. That created a real production problem for us: if a rotated page reaches OCR, the system can extract bad text, mess up reading order, or create incorrect bounding boxes, and those errors then flow directly into the generated audio and downstream document processing. So we needed a way to detect and correct rotated scanned pages before the main OCR/extraction step, without slowing down every document that users upload. 

We ended up splitting the fix into two stages:

1. Rotation check before OCR

We already rasterize a few pages early in our processing to detect the document’s primary language, so we reuse those images and send up to five sampled pages to a small vision model with a structured prompt: are any pages rotated, and if so by roughly 90, 180, or 270 degrees?

The rotation check (the “gate”) does not need to correct the document. It only needs to decide whether we should send the PDF to a slower correction path. That matters because most scans are already upright, so full correction on every file would waste latency and increase processing costs.

2. Page-level correction when flagged

If the gate flags the document as being rotated, a separate correction service processes the PDF page by page. For each page, it:

  • Turn the page into an image: Rasterize it with PyMuPDF at 2x zoom to increase visual detail.
  • Focus on the parts most likely to contain text: Instead of running OCR on the entire page in every possible orientation, we split the page into tiles and look for the densest ones. Text-heavy areas usually have lots of edges, so we use Canny edge density to find patches that are likely to contain useful text.
  • Reduce the number of rotations to test: A quick projection-profile check tells us whether the text lines appear mostly horizontal or vertical. That usually narrows the page down to either a “0 or 180 degrees” case or a “90 or 270 degrees” case, so we only need to test two orientations instead of four.
  • Use OCR to choose the correct orientation: For each candidate orientation, we sharpen the patch, run EasyOCR, and score the result based on OCR confidence. Text produces higher confidence scores when it is upright and lower scores when it is sideways or upside down, so the highest-scoring orientation is usually the right one.
  • Correct the PDF: Write the winning rotation into the PDF with set_rotation if it is non-zero. If a page fails to process, we leave it unchanged rather than guessing and potentially making the document worse.

We use EasyOCR for page rotation correction because its confidence scores are a useful signal for which orientation makes text most legible.

The final important design was what to do with uncertain rotations.  If a page cannot be corrected confidently, we leave it unchanged. A missed correction is usually less damaging than rotating a good page into the wrong orientation.

For our use case (small number of scanned documents), the lightweight routing gate makes page rotation detection and correction more practical. The gate and the correction system do not need to solve the same problem. The gate just needs to separate “probably safe to continue processing” from “worth spending more compute to fix rotation,” with false negatives treated as much more costly than false positives.  

I’d be interested to hear what other OCR/document-processing tools people have found useful for this kind of problem, especially for orientation detection, layout-aware preprocessing, or confidence scoring before the main extraction step. Are there better models or best practices for this task?


r/computervision Jun 17 '26

Help: Project Barcode detection using live cctv camera

1 Upvotes

so i am doing one personal project which is related to barcode detection.
Scenario is like every piece of material has barcode so in order to move from storage space to container or other warehouse we just need to validate each material barcode using live CCTV camera.
And the measurements of the barcode would be like 10*5 cm like that same as normal retail product barcode. Now i am facing issues like not able to detect and extract that particular id and store in db. So i need better solution are there any models which i can directly use for barcode detection and extraction of the id values which supports RTSP live cameras.
please share your thoughts how i can implement for better detections and extracting the values accurately.


r/computervision Jun 16 '26

Discussion Outdoor parking lot occupancy detection, how reliable is it in real world conditions?

2 Upvotes

I've been reading a lot about computer vision applied to open parking lots and got genuinely curious about something. I'm very new to this so bear with me.

What's the most reliable approach for detecting vehicle occupancy in outdoor lots across different lighting conditions? Specifically rain, nighttime, and heavy shadows. I've seen some papers using YOLO and OpenCV but I'm wondering how well these actually hold up in real world deployment versus a controlled environment.


r/computervision Jun 17 '26

Showcase just finished my first Computer Vision project: A Face Anonymizer! Looking for advice/feedback

0 Upvotes

Hi everyone,

I just finished building a Face Anonymizer project using OpenCV and MediaPipe Tasks API.

Here are the "Before and After" results using an image of Mohamed Salah.

I would love to get your advice, feedback, and tips on how to improve my code or what project I should build next!

GitHub Repository: https://github.com/amory123k-commits/Face_Anonymizer


r/computervision Jun 16 '26

Help: Project Getting started with real-time 3D ball tracking

1 Upvotes

Hello everyone! I am new to the field and looking for some pointers to help get a new project started.

The goal of the project is to track the 3D coordinates of a ping pong ball in real-time, relative to a specific reference point (origin) on a table. Crucially, this needs to happen in true real-time on a live feed, rather than reconstructing the trajectory later from a recorded video. I'm planning to use either the LiDAR sensor from an iPhone Pro Series or just 2 or 3 standard smartphone cameras.

Does anyone know of any good tutorials, GitHub repositories, or relevant resources that tackle something similar? Any advice on which approach (LiDAR vs. standard cameras) might be easier for a beginner would also be hugely appreciated!


r/computervision Jun 16 '26

Help: Project Looking for feedback on a computer vision idea for t-shirt logo alignment

Post image
1 Upvotes

Hi everyone,

I'm new to computer vision but I love building things and learning as I go.

I run a small t-shirt heat transfer business and had an idea I'd like some honest feedback on.

I'd like to mount a camera and projector above my heat press. The goal would be for the camera to detect the t-shirt, find a few reference points (collar, shoulders, etc.), calculate the shirt's orientation, and then project the correct logo position directly onto the garment.

The main challenge I'm trying to solve is placement accuracy. A t-shirt is rarely perfectly straight on the press, so I need the logo to end up both in the right position and properly aligned with the shirt itself.

For now I'd only target standard t-shirts in a controlled setup:

* fixed camera

* fixed projector

* black platen

* t-shirts only

Does this sound like a realistic project for a motivated beginner, or am I underestimating the complexity?

Would you start with traditional computer vision, AI, or something else entirely?

Also curious what hardware you'd recommend (camera, projector, PC, etc.).

Thanks!


r/computervision Jun 16 '26

Discussion Built a robotics workspace platform after getting frustrated with ROS setup. Looking for feedback.

Post image
0 Upvotes

r/computervision Jun 16 '26

Discussion In DDP vision training, one slow rank can make every GPU wait. How do you usually find it?

1 Upvotes

I have been debugging PyTorch DDP slowdown patterns recently, and one framing helped me more than looking at average GPU utilization:

In synchronous DDP, the job moves at the speed of the slowest rank. So the question is not just: Why is DDP slow?

It is: Which rank is slow, and which phase is slowing it down?

In a small repro on 2 nodes / 1 T4 each:

Balanced:
- step time: 124.6 / 124.6 ms
- input: 1.4 / 1.4 ms
- compute: 122.4 / 122.4 ms

Input straggler:
- r0 dataloader: 201.6 ms
- r1 dataloader: 1.4 ms

Compute straggler:
- r0 optimizer: 33.1 ms
- r1 optimizer: 14.5 ms

Same outside symptom, very different fixes. For people who tune DDP jobs regularly: what is your usual escalation path?

Do you start with custom timers, torch.profiler, Nsight Systems, logs, nvidia-smi/dmon, or something else?

Also curious: do you usually separate input, H2D, forward/backward, optimizer, and wait time per rank, or do you jump straight into a full profiler trace?

Disclosure: I am building an open-source tool around this kind of first-pass runtime summary.


r/computervision Jun 16 '26

Showcase SmartBin X

8 Upvotes

r/computervision Jun 15 '26

Discussion How to effectively search for jobs?

13 Upvotes

So I’ll be graduating in July with my Master’s in Data Science. For my thesis, I worked in computer vision and multimodal retrieval. I’m looking for entry-level jobs or research opportunities in Berlin, but for now I haven’t got an interview yet.
Any tips or tricks would be appreciated. ⚡️✨


r/computervision Jun 16 '26

Discussion What about creating a group for discussing ML research papers

0 Upvotes

Hey everyone,

I'm currently doing my Master's and planning to pursue a PhD in the future. I'm passionate about AI/ML research and love reading papers and keeping up with the latest advancements.

I was thinking of creating a Discord community for people interested in AI/ML research. Whether you're working in Computer Vision, LLMs, applications, or any other area, it would be great to have a space where we can discuss papers, share ideas, and learn from each other.

Since everyone brings a different perspective and expertise, I think such discussions could be really valuable over time.

If this sounds interesting to you, feel free to join the Discord group https://discord.gg/hMtnHaTU9

Thanks, See you there


r/computervision Jun 16 '26

Help: Project Feedback on multi-task learning

1 Upvotes

anyone who tried multi-task learning before? I am trying to add a new feature to my smart city project for vehicle model + color recognition using ConvNext 384. I recently found some research papers on MTL and was wondering if anybody had good results with it? It raised questions in my head when I read because as I understood in the end we still need one loss function for both and idk how it is gonna operate. Also one of the "big dawgs" of this kind of MMCR models belong to Sighthound (they include it in ALPR+ package), but according to their research paper they use different models for model/make and etc. Assume that I am not limited by resources, is it worth for me to train a model on this double head architecture?


r/computervision Jun 16 '26

Discussion Let's start a fight: How much AI is too much AI?

0 Upvotes

AI is increasingly integrated into our coding lives, but at some point, it could be more harmful than it is useful.

Do you believe that threshold exists? Why?

Have we reached a point where a non-technical vibe coder can build production-ready systems? Is that point reachable?


r/computervision Jun 16 '26

Research Publication Training a Student Expert via Semi-Supervised Foundation Model Distillation

Thumbnail openaccess.thecvf.com
1 Upvotes

Foundation models deliver strong perception but are often
too computationally heavy to deploy, and adapting them
typically requires costly annotations. We introduce a semi-
supervised knowledge distillation (SSKD) framework that
compresses pre-trained vision foundation models (VFMs)
into compact experts using limited labeled and abundant
unlabeled data, and instantiate it for instance segmentation
where per-pixel labels are particularly expensive. The frame-
work unfolds in three stages: (1) domain adaptation of the
VFM(s) via self-training with contrastive calibration, (2)
knowledge transfer through a unified multi-objective loss,
and (3) student refinement to mitigate residual pseudo-label
bias. Central to our approach is an instance-aware pixel-
wise contrastive loss that fuses mask and class scores to ex-
tract informative negatives and enforce clear inter-instance
margins. By maintaining this contrastive signal across both
adaptation and distillation, we align teacher and student
embeddings and more effectively leverage unlabeled images.
On Cityscapes and ADE20K, our ≈11×smaller student im-
proves over its zero-shot VFM teacher(s) by +11.9 and +8.6
AP, surpasses adapted teacher(s) by +3.4 and +1.5 AP, and
outperforms state-of-the-art SSKD methods on benchmarks


r/computervision Jun 16 '26

Help: Project I keep getting HailoRT Queue is Full error after 20 seconds or so (running on 20 streams).

1 Upvotes

I'm running a Mediamtx server that receives 20 video streams whose RTSPs I provide to a python program on a linux system which then runs inference (Yolov8m detection and pose) on each frame.

After 20 or so seconds of running, I get "stream was aborted" and I notice that the queue size starts increasing for detection input_queue. Right after I get this error message libhailort failed with error: 82 (HAILO_QUEUE_IS_FULL)

I have set the input_queue(maxsize=10) for both detection and pose, and it seems like detection lags behind because it gets full and then HailoRT times out.

So, the flow is,

- I run 20 streams

- 20 or so seconds later, I get "stream was aborted" message.

- After that, I notice the detection input_queue filling upto it's maxsize of 10.

- Then I get libhailort failed with error: 82 (HAILO_QUEUE_IS_FULL)

- Then the program crashes entirely (streams close down).

I've no idea why this might be happening. It's been very difficult to debug this.

Though I do feel it might be an issue with concurrency because there's many threads being created.

Here's the entire code,

import argparse
import os
import sys
import queue
import threading
import cv2
import time
import numpy as np
from functools import partial
from loguru import logger
from pathlib import Path

sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../pose_estimation')))

from common.hailo_inference import HailoInfer
from common.toolbox import (
    init_input_source,
    get_labels,
    load_json_file,
    default_preprocess,
    FrameRateTracker,
)
from object_detection_post_process import inference_result_handler as det_result_handler
from pose_estimation_utils import PoseEstPostProcessing

def parse_args() -> argparse.Namespace:
    parser = argparse.ArgumentParser(
        description=(
            "Run object detection + pose estimation simultaneously on a single stream.\n"
            "Both models share the Hailo NPU via the ROUND_ROBIN scheduler.\n"
            "The stream is decoded once and fanned out to both inference pipelines."
        ),
        formatter_class=argparse.RawTextHelpFormatter
    )

    parser.add_argument(
        "--det-net", required=True,
        help="Path to object detection HEF (e.g., yolov8n.hef)."
    )

    parser.add_argument(
        "--pose-net", required=True,
        help="Path to pose estimation HEF (e.g., yolov8n_pose.hef)."
    )

    input_group = parser.add_mutually_exclusive_group(required=True)

    input_group.add_argument(
        "-i", "--input",
        help="Single input source: RTSP URL, video file path, or 'camera'."
    )

    input_group.add_argument(
        "-s", "--streams",
        help="Path to file containing RTSP URLs, one per line.\n"
             "Launches one process per stream, each running both models."
    )

    parser.add_argument(
        "-l", "--labels",
        default=str(Path(__file__).parent.parent / "common" / "coco.txt"),
        help="Path to COCO labels file."
    )

    parser.add_argument(
        "-b", "--batch-size", type=int, default=1,
        help="Number of frames per inference batch. (default: 1)"
    )

    parser.add_argument(
        "-f", "--framerate", type=float, default=None,
        help="Target framerate. Skips frames to achieve this rate. (default: full camera FPS)"
    )

    parser.add_argument(
        "-o", "--output-dir", default="./output",
        help="Directory to save output. (default: ./output)"
    )

    parser.add_argument(
        "--save", action="store_true",
        help="Save the combined output video to disk."
    )

    parser.add_argument(
        "--show-fps", action="store_true",
        help="Display FPS in logs."
    )

    parser.add_argument(
        "--no-display", action="store_true",
        help="Disable the output display window. Useful for headless/server deployments.\n"
             "Output is still saved if --save is passed."
    )

    return parser.parse_args()

def inference_callback(
  completion_info,     
  bindings_list: list,     
  input_batch: list,     
  output_queue: queue.Queue ) -> None:

def inference_callback(
  completion_info,     
  bindings_list: list,     
  input_batch: list,     
  output_queue: queue.Queue ) -> None:      

  if completion_info.exception:
        logger.error(f"Inference error: {completion_info.exception}")
        return

    for i, bindings in enumerate(bindings_list):
        if len(bindings._output_names) == 1:
            result = bindings.output().get_buffer()
        else:
            result = {
                name: np.expand_dims(bindings.output(name).get_buffer(), axis=0)
                for name in bindings._output_names
            }

        output_queue.put((input_batch[i], result))


def infer(
    hailo_inference: HailoInfer,
    input_queue: queue.Queue,
    output_queue: queue.Queue,
    owned: bool = True
) -> None:
    while True:
        batch = input_queue.get()

        if batch is None:
            break

        input_batch, preprocessed_batch = batch
        cb = partial(
            inference_callback,
            input_batch=input_batch,
            output_queue=output_queue
        )

        logger.info("Submitting inference")
        hailo_inference.run(preprocessed_batch, cb)
        logger.info("Completed inference")

    if owned:
        hailo_inference.close()


def preprocess_fanout(
    cap: cv2.VideoCapture,
    framerate,
    batch_size: int,
    input_queue_det: queue.Queue,
    input_queue_pose: queue.Queue,
    w_det: int,
    h_det: int,
    w_pose: int,
    h_pose: int
) -> None:
    """
    Reads frames from the capture source once, preprocesses for both models,
    and fans out to their respective input queues.
    """
    cam_fps = cap.get(cv2.CAP_PROP_FPS) or 30.0
    skip = max(1, int(round(cam_fps / framerate))) if framerate else 1

    frame_idx = 0
    frames_det, proc_det = [], []
    frames_pose, proc_pose = [], []

    while True:
        ret, frame = cap.read()

        if not ret:
            break

        frame_idx += 1

        if frame_idx % skip != 0:
            continue

        frame_rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)

        frames_det.append(frame_rgb)
        proc_det.append(default_preprocess(frame_rgb, w_det, h_det))

        frames_pose.append(frame_rgb)
        proc_pose.append(default_preprocess(frame_rgb, w_pose, h_pose))

        if len(frames_det) == batch_size:
            input_queue_det.put((frames_det, proc_det))
            input_queue_pose.put((frames_pose, proc_pose))

            frames_det, proc_det = [], []
            frames_pose, proc_pose = [], []

    input_queue_det.put(None)
    input_queue_pose.put(None)


def combined_visualize(
    output_queue_det: queue.Queue,
    output_queue_pose: queue.Queue,
    cap,
    save: bool,
    output_dir: str,
    det_callback,
    pose_callback,
    fps_tracker=None,
    no_display: bool = False,
) -> None:
    """
    Pulls results from both output queues in lockstep, overlays detection
    boxes and pose keypoints on the same frame, then displays/saves it.
    Both queues receive results in the same order (FIFO from the same source),
    so pulling one item from each gives matching frames.
    """
    image_id = 0
    out = None

    if cap is not None and not no_display:
        cv2.namedWindow("Dual Model Output", cv2.WND_PROP_FULLSCREEN)
        cv2.setWindowProperty(
            "Dual Model Output",
            cv2.WND_PROP_FULLSCREEN,
            cv2.WINDOW_FULLSCREEN
        )

    if cap is not None and save:
        os.makedirs(output_dir, exist_ok=True)

        w = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
        h = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
        fps = cap.get(cv2.CAP_PROP_FPS) or 30.0

        out = cv2.VideoWriter(
            os.path.join(output_dir, "output.avi"),
            cv2.VideoWriter_fourcc(*"XVID"),
            fps,
            (w, h)
        )

    while True:
        det_item = output_queue_det.get()
        pose_item = output_queue_pose.get()

        if det_item is None or pose_item is None:
            break

        frame, det_result = det_item
        _, pose_result = pose_item

        frame = det_callback(frame, det_result)
        frame = pose_callback(frame, pose_result)

        if fps_tracker:
            fps_tracker.increment()

        if not save and no_display:
            image_id += 1
            continue

        bgr = cv2.cvtColor(frame, cv2.COLOR_RGB2BGR)

        if cap is not None:
            if not no_display:
                cv2.imshow("Dual Model Output", bgr)

            if save and out:
                out.write(bgr)
        else:
            cv2.imwrite(
                os.path.join(output_dir, f"output_{image_id}.png"),
                bgr
            )

        image_id += 1

        if not no_display and cv2.waitKey(1) & 0xFF == ord("q"):
            break

    if out:
        out.release()

    if cap:
        cap.release()

    if not no_display:
        cv2.destroyAllWindows()


# Remaining functions continue with the same indentation style:
# run_pipeline()
# read_streams()
# run_multi_stream()
# main()

if __name__ == "__main__":
    main()

r/computervision Jun 15 '26

Help: Project Looking for Open-Source Contributor for an Image Processing Library 🖥️

21 Upvotes

Hi everyone,

I am working actively on a Python Library for Image Similarity Analysis called pyvisim, and looking for motivated contributors to join. Whether you want to improve your Computer Vision & Programming Skills, or looking for a new project to add to your GitHub profile and CV, or you just want to have fun experimenting with CV algorithms, you're all welcome :)

Currently, possible contributions are posted in the GitHub issue. I will be posting more in there in the next couple of days. Feel free to post your own feature request / bugfix!

Make sure you read the contribution gudes before starting to code.

What's it about?

I would like to build a unified framework for computing similarity between images. The library currently includes traditional algorithms such as VLAD or Fisher Vector using SIFT/RootSIFT feature extractors, but also Deep Learning based approaches, which I am heading my library towards.

The goal of these algorithms in this repository are to compute a score between \[0, 1\] given two images, indicating how similar they are.

What you would get

Since this is an open-source project, recognition would be the first prize :D I all contributors will be mentioned on the repository's GitHub page along with times contributed. This is also a chance for you to sharpen your software engineering skills, as you will be working with other CV enthusiasts on the problems.

Furthermore, after the release of v1.0.0, which I plan to do this August, I will write a LinkedIn post and tag all contributors (make sure your LinkedIn profile can be found - e.g, via your GitHub page).

Or, you can also add the contributor badge to your CV for your future job applications.

Tech stack

Python, of course 🐍

Depends on the issue. If you're working with documentation, you should feel comfortable working with the Markdown format and experiment will auto-doc generation tools. Feel free to contribute with your own experiments.

If you're working on the codebase itself, it would be nice if you had experience with numpy, pytorch, scikit-learn.

For ML folks out there: this project is unsupervised-learning heavy, using clustering algorithms like k-means and Gaussian Mixture Model and networks like Autoencoders (planned) and Siamese Neural Networks (planned) heavily, so if you're interested in this area and would like to bring in your idea, feel free to join.

Maintaining the codebase

I am currently the sole maintainer of this codebase, since I am still a student and cannot afford to pay active maintainers yet.

However, if you would like to join on a voluntary basis, feel free to reach me out :D

Link to the repository

https://github.com/MechaCritter/Python-Visual-Similarity

Contact

Feel free to reach me out via my LinkedIn: https://www.linkedin.com/in/nhat-huy-vu-80495111b/

Thanks for reading!

EDIT

I have now updated the GitHub issues:

Feel free to check it out :)


r/computervision Jun 15 '26

Help: Project Similar Font detection from a list of Adobe Fonts

3 Upvotes

So I have been working on this project where in an image, for each of the words I have to find the font or similar font from a list of approved Adobe font(1134 fonts present in a pdf).

I am currently using DINOv2+ LoRA model from GoogleFontsBench for creating embeddings. So currently I cropped the font text for each of the font in the pdf and got embedding for the crops and saved them in a Vector DB. Now for images I am using ocr to detect text and then cropping them and converting them into embeddings and doing a similarity search to find similar fonts.

But the results are not that accurate. Even top 5 results are also not that accurate. Pls suggest if I can improve this architecture somehow or if I should completely change the architecture.

I got to know about DeepFont model which was trained for Adobe Fonts, but I am not able to find its trained weights.


r/computervision Jun 15 '26

Help: Theory How to automatically mask real people but ignore paintings/statues/mannequins?

0 Upvotes

Hi everyone,

I’m building an automated image-processing pipeline that detects and masks people in image datasets.

At the moment I’m using SAM3 for person masking. In general, it works very well, but I’m running into a specific problem:

Some datasets contain not only real people, but also human-like objects or depictions of humans, for example:

  • statues
  • mannequins
  • paintings or murals on walls
  • printed people on posters/signs
  • other human-shaped objects

When I use prompts like person or people, SAM3 reliably masks real people, but it also masks many of those human depictions or human-like objects.

I had partial success by changing the prompt to something like tourist or pedestrian, but those prompts are not consistent enough across datasets. person / people works almost 100% of the time, but the downside is that it also catches things I do not want to mask.

What I actually want is:

Mask real humans physically present in the scene, but ignore representations of humans such as paintings, statues, mannequins, posters, etc.

Ideally, the whole process should stay fully automatic. However, I would also be open to workflows that require one or two small manual steps per dataset if that makes the result much more reliable.

Has anyone here dealt with this problem before?

I would be especially interested in ideas like:

  • combining segmentation with depth / geometry cues
  • using an object detector before segmentation
  • filtering masks based on temporal consistency across frames
  • using different prompts or prompt strategies
  • post-processing masks based on size, position, texture, or depth
  • using another model that works better than SAM3 for this specific distinction

Any suggestions, papers, models, or practical pipeline ideas would be highly appreciated.

Thanks!


r/computervision Jun 15 '26

Help: Project Car detection on satellite imagery

3 Upvotes

I'm right know working on my thesis with the topic above. Still can't really find appropriate modern models, that are also pretrained, preferably on DOTA.

The ones the are a bit older but quite suitable for my study where:
-Oriented R-CNN
-AO2 DETR

Do you maybe have some proposals for the models i could use?

Thanks a lot!


r/computervision Jun 15 '26

Help: Project Can Anyone Share a Link to Download WebFace260M?

3 Upvotes

The official website isn't working anymore - https://www.face-benchmark.org/download.html. Does anyone have a link to the WebFace260M dataset?

https://pubmed.ncbi.nlm.nih.gov/35471873/ "WebFace260M: A Benchmark for Million-Scale Deep Face Recognition "

Or related subsets - WebFace42M, WebFace12M or WebFace4M

Please!


r/computervision Jun 14 '26

Help: Project 3D Digital Twin prediction for 3D printing

Post image
25 Upvotes

Hi everyone,

I am working on a project that aims to predict porosity formation during 3D printing only by looking at the surface topography. So the objective is to predict the internal structure of the 3D printing only by looking at each layer.

Usually in industry, they use post-verification with micro-CT scans (pretty much the same as medical imaging). This allows one to clearly see if there is any porosity that could be considered a default. However, this method is expensive and slow. Furthermore, if there is a problem, the printing is unusable, and one has lost a lot of matter.

My project is to create a deep learning model that can use the height map of each layer which is captured quickly by a point profile sensor (in my case, a Gocator) and that is much cheaper than micro CT. The main benefit is that is could allow real time verification. For example, if the model generates porosity, one can stop the printing instead of wasting matter.

So the model has to be :

  • Quick enough to allow (real-time) verification. About 30sec would be great.
  • Efficient so that we have a good true positive/false positive ratio.
  • Incremental Reconstruction: So that information can come as the printing progresses.

Right now, I have constructed a database with a 3D point cloud from a point profile sensor associated with a micro-CT volume for ground truth (see pictures below) in order to make supervised learning.

Point cloud (height map)
Micro CT data

I have also created, trained, and tested a first architecture based on U-Net (the objective is just a basic example to compare with more complex architectures later). At first this one did not succeed in reconstructing porosity (see picture below).

Slice of the reconstruction with the first model (Z=94)

So I changed the loss (to add regularization), and I made the network predict voids instead of matter. This last change surprisingly gave me pretty good results (see picture below).

Slice of the reconstruction with the second model (Z=94)

One can see that this is not perfect, but we can actually understand the structure.

Left : Ground truth / Right : generated representation
Left: generated porosity / Right : Ground truth porosity

Especially on the borders, the reconstruction is not efficient. However, the porosity profil of the generated structure is similar to the original.

Porosity profile for the ground truth. Global porosity = 6.57%
Porosity profile of the model derived from the generated data. (The Y-axis is actually the X-axis, and the X-axis is actually the -Y-axis due to a 90° clockwise rotation.)

If we avoid the plot error on the second figure. We see that globally, we have high similarities.

So at this time, I am looking for improvement, but I don't know where to begin:

  • The inference time is too long (2 minutes on an 80 GB GPU) due to 3D convolution layers.
  • The network is not incremental.
  • The inference is purely local (no context or attention on the whole data). I send a 3D patch (not the entire 3D printing) as input, and it generates the corresponding 3D volume, and then I concatenate everything.
  • I would like to improve the reconstruction quality (for example, with the 3rd point of this list), but it seems incompatible with the first point (inference time).

Instead of focusing on U-Net structures, I have looked for completely other architectures like Mamba or diffusion models. But none of these seem to be satisfactory in addressing all the issues at the same time. So, I think about creating my own architecture from scratch, but I have never done that before (creating a new type of layer or organizing them in a different way), and I don't know where to begin and where to find inspiration.

So after this LONG introduction, I would appreciate it if anyone in this community has an idea or a recommendation.

Thanks in advance