cmahnke/vintagereality
By cmahnke · ↓ 3 · ♥ 0 · Updated 2025-12-29
What's in this repo
This page lists the files in cmahnke/vintagereality, including vintagereality-1.0.onnx.
- 1 ONNX models (.onnx files)
- 4 files, including 1 .md, 1 .onnx, 1 .pt
- Last updated 2025-12-29
ONNX files
| File | Size | Download |
|---|---|---|
| vintagereality-1.0.onnx | — | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
VitageReality Model
Purpose
This model can be used to seperate the left and right half image from a stereograph card. The have been historically used with a stereoscope.
Keep in mind that there have been several simila systems in the 19th and 20th century, currently this model is anly trained to work with the Underwood & Underwood sterescope (sometimes also known as Holmes sterescope). Other types aren't handled yet.
Description and use case
Hve a look at these two blog posts for a introduction and use case:
Basic usage
The Model can be used with Python
Required dependencies
pip install ultralytics
Usage
from ultralytics import YOLO
from PIL import Image
pil_image = Image.open(args.image)
model = YOLO(model_path)
results = model(pil_image, verbose=False, retina_masks=True)
left_img = None
right_img = None
r = results[0]
if not r.boxes or len(r.boxes) != 2:
raise Exception(f"YOLO detected {len(r.boxes) if r.boxes else 0} regions, expected exactly 2.")
boxes = r.boxes.xyxy.cpu().numpy()
# This is needed to get the order right
indexed_boxes = sorted(enumerate(boxes), key=lambda x: x[1][0])
left_idx, left_box = indexed_boxes[0]
right_idx, right_box = indexed_boxes[1]
masks = r.masks.data.cpu().numpy()
Afterwars you can either use left_box and right_box to extract the half images. You can also use the masks to extract the half image only, without the arch at the top.
Model info
Created: 2025-12-26
Updated: 2025-12-29
View on Hugging FaceFiles (4)
Related models
More from cmahnke
No other models by this author.