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!


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


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-1.1.0.tar.gz (170.3 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-1.1.0-py3-none-any.whl (156.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for raptor_vision-1.1.0.tar.gz
Algorithm Hash digest
SHA256 459fb65ce8377c432f4d3e258b412ae489b1e06fdfda8f631c74396055540958
MD5 a60918bf224ba1a794ab879393a4472a
BLAKE2b-256 e1d46b49af343101959816c954499991c964ae1d3474e04aeafe3f7a024be277

See more details on using hashes here.

File details

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

File metadata

  • Download URL: raptor_vision-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 156.4 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-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4ebd6c6734012b0353e64ababee242d0bb7413adc2565b8695122aec281dedb2
MD5 6ba0dcb7a62db00e30749e08bd7b38aa
BLAKE2b-256 d2cc3d823b34b37ed014a3f36b70f25b5fd0e20c109e9ded53ec06930e273135

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