Skip to main content

Semantic Patch Analysis using DINOv3

Project description

RaptorVision Logo RaptorVision

License: GPL v3 PyPI version

RaptorVision is an open-source tool developed by Rémi Pérenne, built upon Meta's DINOv3 foundation models. It allows anyone to create a custom object detection model with just a few clicks, requiring only a handful of example images.

Why RaptorVision?

This project was born from a specific need in biology: sorting through thousands of images from wildlife camera traps. While excellent tools like MegaDetector exist, they are often based on the YOLO architecture, which requires thousands of annotated images to recognize a specific species. This makes them difficult to use for rare species where data is scarce.

RaptorVision changes the game by using "few-shot learning":

  • Efficiency: Learns what your target looks like from just 1 or 2 clicks.
  • Versatility: Works for animals or any specific entity.
  • Speed: Drastically reduces the time spent manually sorting images that do not contain what you want.

The name is a nod to Meta's DINO model (Velociraptor is a dinosaur) and the fact that the software acts as a "predator" finding its prey (your data) within a sea of images.


Installation

RaptorVision is available on PyPI. You can install it using pip:

pip install raptor-vision

Model Weights Setup

Due to Meta's license agreement, the model weights cannot always be downloaded automatically. If the software fails to download them on the first run, follow these steps:

  1. Visit the Meta DINO Download Page and fill out the form.
  2. Download the Small, Base, or Large models (the Small version is sufficient for 90% of use cases).
  3. You will obtain files named like:
    • dinov3_vits16_pretrain_lvd1689m-08c60483.pth (Small)
    • dinov3_vitb16_pretrain_lvd1689m-73cec8be.pth (Base)
    • dinov3_vitl16_pretrain_lvd1689m-8aa4cbdd.pth (Large)
  4. Launch raptor-vision. If the models are missing, the terminal will display the specific Torch cache path on your system.
  5. Copy your downloaded .pth files into that directory and restart the application.

Usage Guide

A comprehensive user guide is integrated directly within the RaptorVision interface. Simply launch the app to explore the features!

By default raptor vision is launched with dino-small and an image resolution (the length of the shortest side of the image) of 672px. If you find that RaptorVision does not detect correctly the entities on your images you can try to increase the resolution (be carefull it shall be a multiple of 16) or to use a better version of dino by typing: raptor-vision --model_size=[size] --image_resolution=[res] where size can be small, base or large and res has to be a multiple of 16. For advanced users, you can use a convnext backbone by specifying --backbone=convnext, this is useful when animals are often on the edges of the image (see technical paper in /paper).


Examples & Performance

1. Point-and-Detect

Simply click on an object (e.g., a frog) to teach the model. The left panel shows the reference selection:

frog

Select one bird...

bird1

...and RaptorVision automatically detects the others in subsequent frames:

bird2 bird3

Note: The top-right window shows which memory image the model is currently using for detection.

2. Complex Scenarios

RaptorVision handles visual diversity well. By clicking on a lizard, the model successfully identifies other lizards and even a snake in the same environment.

lezard1 lezard2 lezard3

Tip: If the model is too sensitive (e.g., picking up a snake when you only want lizards), you can easily adjust the sensitivity threshold in the UI.

3. RaptorScan (Batch Processing)

For large datasets, RaptorVision generates detection heatmaps and automates file management.

Original Image:

frog

Detection Heatmap:

frog

RaptorScan Interface: You can process entire folders, automatically copy images containing detections to a new folder, and export detailed statistics (CSV/TXT) for analysis in Python or Excel. raptorscan


Technical Details & Benchmarks

For an in-depth explanation of how RaptorVision works under the hood — including the DINOv3 feature extraction pipeline, similarity scoring, and performance benchmarks — see the technical paper:

📄 paper/paper_conference.pdf


Credits & Data


License: This project is licensed under the GPLv3 License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

raptor_vision-2.0.0.tar.gz (174.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

raptor_vision-2.0.0-py3-none-any.whl (159.7 kB view details)

Uploaded Python 3

File details

Details for the file raptor_vision-2.0.0.tar.gz.

File metadata

  • Download URL: raptor_vision-2.0.0.tar.gz
  • Upload date:
  • Size: 174.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for raptor_vision-2.0.0.tar.gz
Algorithm Hash digest
SHA256 73b753b81ac9032f2fb40eb5ec3ae57b8dc36afa896cce401184115942cdd717
MD5 1cd42d2e86b643bb76ef1017aa44ad16
BLAKE2b-256 084ed203e35bf3aba51c5bd46a271f451e2a940f1d0a8d2416abd35f984fd618

See more details on using hashes here.

File details

Details for the file raptor_vision-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: raptor_vision-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 159.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for raptor_vision-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 31f4fd7195640c42a7efaca83e5647df8d48cab16ab7fb6d06a22c7aa0c859bf
MD5 ab6e26ccf4038315153d00aa48fd17a4
BLAKE2b-256 db9d5b73b2e4500b93212e018c78872dc7d513b8360de5fdbf7394bc13fb263c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page