Code Monkey home page Code Monkey logo

video_pedestrian_attributes_recognition's Introduction

The website of our lab sometime got closed for some political reason, the attributes dataset can also be downlowded BaiduYun(passwd:beda) OR GoogleDrive

video_pedestrian_attributes_recognition

Codes for the paper "A Temporal Attentive Approach for Video-Based Pedestrian Attribute Recognition".

Introduction

This repository contains PyTorch implementations of temporal modeling methods for video-based pedestrian attributes recognition. It is forked from Video-Person-ReID. Based on that, I implement temporal modeling methods including temporal pooling, temporal attention, RNN and 3D conv for multi-attributes recognition. PyTorch 0.4.1, Torchvision 0.2.1 and Python 3.7 is used.

Motivation

Although previous work proposed many temporal modeling methods and did extensive experiments, but it's still hard for us to have an "apple-to-apple" comparison across these methods. As the image-level feature extractor and loss function are not the same, which have large impact on the final performance. Thus, we want to test the representative methods under an uniform framework.

Dataset

Experiments are done on MARS.

Please follow deep-person-reid to prepare the data. The instructions are copied here:

  1. Create a directory named mars/ under data/.
  2. Download dataset to data/mars/ from http://www.liangzheng.com.cn/Project/project_mars.html.
  3. Extract bbox_train.zip and bbox_test.zip.
  4. Download split information from https://github.com/liangzheng06/MARS-evaluation/tree/master/info and put info/ in data/mars (we want to follow the standard split in [8]).
  5. Download mars_attributes.csv from http://irip.buaa.edu.cn/mars_duke_attributes/index.html, and put the file in data/mars. The data structure would look like:
mars/
    bbox_test/
    bbox_train/
    info/
    mars_attributes.csv
  1. Use -d mars when running the training code.

Experiments are done on Duke.

  1. Create a directory named duke/ under data/.
  2. Download dataset to data/duke/ from http://vision.cs.duke.edu/DukeMTMC/data/misc/DukeMTMC-VideoReID.zip.
  3. Extract DukeMTMC-VideoReID.zip.
  4. Download duke_attributes.csv from http://irip.buaa.edu.cn/mars_duke_attributes/index.html, and put the file in data/duke. The data structure would look like:
duke/
    train/
    gallery/
    query/
    duke_attributes.csv
  1. Use -d duke when running the training code.

Usage

To train the model, please run

python -u main_video_attr_recog.py --arch=attr_resnet50tp --model_type="ta"

arch could be Temporal Attention Method (--arch=attr_resnet50tp --model_type="ta"), Temporal Pooling Method (--arch=attr_resnet50tp --model_type="tp"), RNN Attention Method (--arch=attr_resnet50tp --model_type="rnn"), 3D conv (--arch=attr_resnet503d). For 3D conv, I use the design and implementation from 3D-ResNets-PyTorch, just minor modification is done to fit the network into this person attributes recognition system.

Other detailed settings for different temporal modeling could be found in models/AttrModels.py

video_pedestrian_attributes_recognition's People

Contributors

yuange250 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

video_pedestrian_attributes_recognition's Issues

some errors

Hi, I am runing your code, there are so many errors.
such as IndexError: list index out of range
File "main_video_attr_recog.py", line 227, in attr_main
attr_train(model, criterion, optimizer, trainloader, use_gpu)
File "main_video_attr_recog.py", line 268, in attr_train
loss += criterion(outputs[i], attrs[i]) / attr_lens[i]

Problem with dowloading dataset from Europe

Hello,
I'm interested in MARS and DUKE datasets with attribute annotations.
However, I cannot register myself on the Baidu website since I haven't any Chinese telephone number. So, I cannot download the annotations.
Could you also share the dataset on GoogleDrive or Dropbox cloud services?

Thanks!

pre-training model

Hi, I would like to ask if you have a pre-training model for this? I would like to know the test results, thanks

dataset problem

Hello, I found your code recently and wanted to try it, but I found that in the website provided in the paper, the data set download page could not be accessed. Could you tell me where I can download the data set?

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.