MCPcopy Index your code
hub / github.com/Hydragon516/DPA

github.com/Hydragon516/DPA @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
157 symbols 349 edges 10 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Dual Prototype Attention for Unsupervised Video Object Segmentation

<a href='https://suhwan-cho.github.io' target='_blank'>Suhwan Cho* <sup> 1</sup></a>&emsp;
<a href='https://hydragon.co.kr' target='_blank'>Minhyeok Lee* <sup> 1</sup> </a>&emsp;
<a target='_blank'>Seunghoon Lee <sup> 1</sup></a>&emsp;
<a href='https://dogyoonlee.github.io' target='_blank'>Dogyoon Lee <sup> 1</sup></a>&emsp;
<a target='_blank'>Heeseung Choi <sup> 1,2</sup></a>&emsp;
<a target='_blank'>Ig-Jae Kim <sup> 1,2</sup></a>&emsp;
<a target='_blank'>Sangyoun Lee <sup>1,2</sup></a>&emsp;









                  <sup>1</sup> Yonsei University &nbsp;&nbsp;&nbsp;
                  <sup>2</sup> Korea Institute of Science and Technology (KIST) &nbsp;

CVPR 2024

PWC PWC PWC

Abstract

Unsupervised video object segmentation (VOS) aims to detect and segment the most salient object in videos. The primary techniques used in unsupervised VOS are 1) the collaboration of appearance and motion information; and 2) temporal fusion between different frames. This paper proposes two novel prototype-based attention mechanisms, inter-modality attention (IMA) and inter-frame attention (IFA), to incorporate these techniques via dense propagation across different modalities and frames. IMA densely integrates context information from different modalities based on a mutual refinement. IFA injects global context of a video to the query frame, enabling a full utilization of useful properties from multiple frames. Experimental results on public benchmark datasets demonstrate that our proposed approach outperforms all existing methods by a substantial margin. The proposed two components are also thoroughly validated via ablative study.

Datasets

Prepare all dataset.

We use RAFT to generate optical flow maps.

You can also get pre-processed datasets from TMO.

The complete dataset directory structure is as follows:

dataset dir/
├── DUTS_train/
│   ├── RGB/
│   │   ├── sun_ekmqudbbrseiyiht.jpg
│   │   ├── sun_ejwwsnjzahzakyjq.jpg
│   │   └── ...
│   └── GT/
│       ├── sun_ekmqudbbrseiyiht.png
│       ├── sun_ejwwsnjzahzakyjq.png
│       └── ...
├── DAVIS_train/
│   ├── RGB/
│   │   ├── bear_00000.jpg
│   │   ├── bear_00001.jpg
│   │   └── ...
│   ├── GT/
│   │   ├── bear_00000.png
│   │   ├── bear_00001.png
│   │   └── ...
│   └── FLOW/
│       ├── bear_00000.jpg
│       ├── bear_00001.jpg
│       └── ...
└── DAVIS_test/
    ├── blackswan/
    │   ├── RGB/
    │   │   ├── blackswan_00000.jpg
    │   │   ├── blackswan_00001.jpg
    │   │   └── ...
    │   ├── GT/
    │   │   ├── blackswan_00000.png
    │   │   ├── blackswan_00001.png
    │   │   └── ...
    │   └── FLOW/
    │       ├── blackswan_00000.jpg
    │       ├── blackswan_00001.jpg
    │       └── ...
    ├── bmx-trees
    └── ...

Training Model

We use a two-stage learning strategy: pretraining and finetuning.

Pretraining

  1. Edit config.py. The data root path option and GPU index should be modified.
  2. training
python pretrain.py

Finetuning

  1. Edit config.py. The best model path generated during the pretraining process is required.
  2. training
python train_for_DAVIS.py

Evaluation

See this link.

Results

Ours pre-calculated prediction masks can be downloaded here.

Core symbols most depended-on inside this repo

resize
called by 8
dataloader/data_for_video.py
resize
called by 7
model/model_for_pretrain.py
resize
called by 7
model/model_for_video.py
rgb_loader
called by 5
dataloader/data_for_video.py
print_status
called by 4
logger.py
get_image_class_dict
called by 4
dataloader/data_for_video.py
rgb_loader
called by 4
dataloader/data_for_video.py
get_ocr_vector
called by 4
model/model_for_video.py

Shape

Method 75
Function 54
Class 28

Languages

Python100%

Modules by API surface

model/model_for_video.py48 symbols
model/model_for_pretrain.py37 symbols
dataloader/data_for_video.py24 symbols
dataloader/data_for_pretrain.py23 symbols
logger.py9 symbols
train_for_DAVIS.py5 symbols
pretrain.py5 symbols
metrics.py5 symbols
loss.py1 symbols

For agents

$ claude mcp add DPA \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact