GithubHelp home page GithubHelp logo

mfa-feature-warping's Introduction

Multi-Frame Attention with Feature-Level Warping for Drone Crowd Tracking

Overview of our method

Illustration

Overview of our method. (a) Entire network structure, (b) Multi-frame attention with feature-level warping. The module consists of three modules: forward warping, multi-frame attention, and backward warping. Forward warping aligns features according to frame $T$, and multi-frame attention aggregate temporal context. Since the extracted feature maps are aligned to $T$, the feature maps are warped into features that represent original positions by backward warping.

This repository provides the offical release of the code package for my paper Multi-Frame Attention with Feature-Level Warping for Drone Crowd Tracking in WACV 2022 (url comming soon).

This method is designed to better address the problem of drone crowd tracking by efficiently aggregating multiple frames information. Comparing to conventional seven methods, proposed method improves the tracking and localization mAP from backbone score.

Requirements

  • PyTorch 1.12.0
  • cuda && cudnn
  • Download the DroneCrowd datasets DroneCrowd BaiduYun(code:ml1u)| GoogleDrive

We strongly recommend using a virtual environment like Anaconda or Docker. The following is how to build the virtual environment for this code using anaconda.

$ pip install -r env/requirements.py

Dataset

DroneCrowd (Full Version)

This full version consists of 112 video clips with 33,600 high resolution frames (i.e., 1920x1080) captured in 70 different scenarios. With intensive amount of effort, our dataset provides 20,800 people trajectories with 4.8 million head annotations and several video-level attributes in sequences.

DroneCrowd BaiduYun(code:ml1u)| GoogleDrive

Preparation

Please prepare your data you installed as above as follows.

current dir
./dataset
    ├── train
    │   └── train_imgs                       
    │        ├── sequence001                # Each sequence has 300 images 
    │        ├── sequence002
    │        ├── :
    │        └── sequenceN                       
    ├── val  
    │   └─ val_imgs                          # Same structure of train_imgs
    │        ├── sequence011                # Each sequence has 12 images 
    │        ├── sequence015
    │        ├── :
    │        └── sequenceM  
    └── test
         └── test_imgs                       # Same structure of train_imgs.
              ├── sequence011                # Each sequence has 300 images 
              ├── sequence015
              ├── :
              └── sequenceM  

Ground-Truth

If you use this code, run this command to create heatmap's ground-truth first. Training & Validation ground-truth are added in dataset directory. The train_map and val_map directory will be automatically created.

$ python create_gts.py

Training

  1. Prepare the training set. In dataset directory(example datsets are setted). Default dataset's path is determined at config/train.yaml.
  2. Run the training script
$ python train.py

Arguments

You can set up input path/output path/parameters from config/train.yaml.

Test

Comming soon

Pre-trained models

The trained models are available in the folder /models/trained.

Citation

Please cite this paper if you want to use it in your work.

@inproceedings{asanomi2023multi,
  title={Multi-Frame Attention with Feature-Level Warping for Drone Crowd Tracking},
  author={Asanomi, Takanori and Nishimura, Kazuya and Bise, Ryoma},
  booktitle={Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision},
  pages={1664--1673},
  year={2023}
}
@inproceedings{dronecrowd_cvpr2021,
  author    = {Longyin Wen and
               Dawei Du and
               Pengfei Zhu and
               Qinghua Hu and
               Qilong Wang and
               Liefeng Bo and
               Siwei Lyu},
  title     = {Detection, Tracking, and Counting Meets Drones in Crowds: A Benchmark},
  booktitle = {CVPR},
  year      = {2021}
}

mfa-feature-warping's People

Contributors

asanomitakanori avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

mfa-feature-warping's Issues

Key 'mpms' is not in struct

The repository is full of bugs and missing code. It is hard to reproduce results.

Traceback (most recent call last):
  File "/home/host/Projects/mfa-feature-warping/train.py", line 171, in main
    train_net(net=net, device=device, cfg=cfg, val_clip=val_clip)
  File "/home/host/Projects/mfa-feature-warping/train.py", line 28, in train_net
    train = Heatmap_Dataset(cfg.train, cfg.dataloader)
  File "/home/host/Projects/mfa-feature-warping/utils/dataset_train.py", line 16, in __init__
    self.gts_dir = abs_path(cfg_type.mpms)
omegaconf.errors.ConfigAttributeError: Key 'mpms' is not in struct
    full_key: train.mpms
    object_type=dict

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

Where can I get the pretrained model?

Hi, thanks for the great work!
I tried to test the results, but I couldn't find the pretrained model.
It seems there is no folder named /models/trained.
Where can I get it?

Test - Comming soon

How to generate predictions of the model and validate them using the Dronecrowd-VID tool?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.