Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

DADO Code Snapshot

This folder contains the DADO implementation used for the CAIP 2025 paper.

Contents

  • dado.py: main DADO pipeline.
  • myutils/: local DADO utility modules.
  • dinov1/: local DINOv1 implementation used by the default configuration.
  • dinov2/: included because the main script imports the DINOv2 loader, although the default configuration uses DINOv1.
  • prepare_project.sh: setup script for dependencies, local folders, the DINOv1 checkpoint, and optional VOC datasets.
  • requirements.txt: Python runtime dependencies.

Large local assets are intentionally not tracked in Git:

  • pretrained/
  • datasets/
  • results/
  • analysis/

Use the setup script below to recreate the required local files after cloning.

Prepare

Create and activate a Python environment first. For example, with venv:

python3.11 -m venv .venv
.venv/bin/python -m pip install --upgrade pip

Then prepare the project from this folder with the venv interpreter:

PYTHON=.venv/bin/python ./prepare_project.sh

Or, with conda:

conda create -n dado python=3.11
conda activate dado

Then prepare the project from this folder:

./prepare_project.sh

This installs requirements.txt, creates the local output/data folders, and downloads the required DINOv1 checkpoint for the default DADO configuration:

pretrained/dino_deitsmall16_pretrain.pth

The original project also kept other optional pretrained weights for experiments. To download the full local pretrained set, run:

./prepare_project.sh --with-all-pretrained

That downloads:

  • pretrained/dino_deitsmall16_pretrain.pth default DINOv1 small checkpoint
  • pretrained/dino_vitbase16_pretrain.pth optional DINOv1 base checkpoint
  • pretrained/dinov2_vitb14_reg4_pretrain.pth optional DINOv2 base checkpoint with registers
  • pretrained/dinov2_vits14_pretrain.pth optional DINOv2 small checkpoint without registers
  • pretrained/dinov2_vits14_reg4_pretrain.pth optional DINOv2 small checkpoint with registers
  • pretrained/depth_anything_v2_vitl.pth optional Depth Anything V2 large checkpoint

To also download Pascal VOC 2007:

./prepare_project.sh --with-voc2007

To download VOC 2007 and VOC 2012:

./prepare_project.sh --with-all-voc

If you already have an environment prepared and only want the checkpoint/folders:

./prepare_project.sh --no-deps

If your Python executable is not named python, pass it explicitly:

PYTHON=/path/to/python ./prepare_project.sh --with-voc2007

Run

From this folder:

MPLBACKEND=Agg python dado.py --dataset-path /path/to/VOC2007/VOCdevkit/VOC2007 --images 009331 --timestamp test_009331

If you downloaded VOC 2007 with prepare_project.sh --with-voc2007, you can run:

MPLBACKEND=Agg python dado.py --dataset-path datasets/VOC2007/VOCdevkit/VOC2007 --images 009331 --timestamp test_009331

If --images is omitted, DADO processes all images returned by the VOC image-set loader.

Outputs are written locally to:

  • results/<timestamp>_results.csv
  • results/<timestamp>_images/
  • analysis/<timestamp>_images/

The DPT depth model is loaded from Hugging Face (Intel/dpt-beit-base-384) unless it is already present in the local Transformers cache.