All Projects → vt-vl-lab → Ican

vt-vl-lab / Ican

Licence: mit
[BMVC 2018] iCAN: Instance-Centric Attention Network for Human-Object Interaction Detection

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Ican

Hoi Learning List
A list of the Human-Object Interaction Learning studies.
Stars: ✭ 145 (-35.56%)
Mutual labels:  action-recognition
Hand pose action
Dataset and code for the paper "First-Person Hand Action Benchmark with RGB-D Videos and 3D Hand Pose Annotations", CVPR 2018.
Stars: ✭ 173 (-23.11%)
Mutual labels:  action-recognition
Step
STEP: Spatio-Temporal Progressive Learning for Video Action Detection. CVPR'19 (Oral)
Stars: ✭ 196 (-12.89%)
Mutual labels:  action-recognition
Untrimmednet
Weakly Supervised Action Recognition and Detection
Stars: ✭ 152 (-32.44%)
Mutual labels:  action-recognition
C3d Keras
C3D for Keras + TensorFlow
Stars: ✭ 171 (-24%)
Mutual labels:  action-recognition
Hidden Two Stream
Caffe implementation for "Hidden Two-Stream Convolutional Networks for Action Recognition"
Stars: ✭ 179 (-20.44%)
Mutual labels:  action-recognition
Hake
HAKE: Human Activity Knowledge Engine (CVPR'18/19/20, NeurIPS'20)
Stars: ✭ 132 (-41.33%)
Mutual labels:  action-recognition
Ta3n
[ICCV 2019 (Oral)] Temporal Attentive Alignment for Large-Scale Video Domain Adaptation (PyTorch)
Stars: ✭ 217 (-3.56%)
Mutual labels:  action-recognition
Video Caffe
Video-friendly caffe -- comes with the most recent version of Caffe (as of Jan 2019), a video reader, 3D(ND) pooling layer, and an example training script for C3D network and UCF-101 data
Stars: ✭ 172 (-23.56%)
Mutual labels:  action-recognition
Mmskeleton
A OpenMMLAB toolbox for human pose estimation, skeleton-based action recognition, and action synthesis.
Stars: ✭ 2,378 (+956.89%)
Mutual labels:  action-recognition
Timeception
Timeception for Complex Action Recognition, CVPR 2019 (Oral Presentation)
Stars: ✭ 153 (-32%)
Mutual labels:  action-recognition
Dynamic Image Nets
Dynamic Image Networks for Action Recognition
Stars: ✭ 163 (-27.56%)
Mutual labels:  action-recognition
Amass
Data preparation and loader for AMASS
Stars: ✭ 180 (-20%)
Mutual labels:  action-recognition
Awesome Activity Prediction
Paper list of activity prediction and related area
Stars: ✭ 147 (-34.67%)
Mutual labels:  action-recognition
Ig65m Pytorch
PyTorch 3D video classification models pre-trained on 65 million Instagram videos
Stars: ✭ 217 (-3.56%)
Mutual labels:  action-recognition
Actionrecognition
Explore Action Recognition
Stars: ✭ 139 (-38.22%)
Mutual labels:  action-recognition
Vip
Video Platform for Action Recognition and Object Detection in Pytorch
Stars: ✭ 175 (-22.22%)
Mutual labels:  action-recognition
Paddlevideo
Comprehensive, latest, and deployable video deep learning algorithm, including video recognition, action localization, and temporal action detection tasks. It's a high-performance, light-weight codebase provides practical models for video understanding research and application
Stars: ✭ 218 (-3.11%)
Mutual labels:  action-recognition
Actionvlad
ActionVLAD for video action classification (CVPR 2017)
Stars: ✭ 217 (-3.56%)
Mutual labels:  action-recognition
Optical Flow Guided Feature
Implementation Code of the paper Optical Flow Guided Feature, CVPR 2018
Stars: ✭ 186 (-17.33%)
Mutual labels:  action-recognition

This repository is no longer maintained. I am no longer actively maintaining iCAN. Please refer to our ECCV 2020 work DRG for a stronger HOI detection framework in PyTorch.

iCAN: Instance-Centric Attention Network for Human-Object Interaction Detection

Official TensorFlow implementation for iCAN: Instance-Centric Attention Network for Human-Object Interaction Detection.

See the project page for more details. Please contact Chen Gao ([email protected]) if you have any questions.

Prerequisites

This codebase was developed and tested with Python2.7, Tensorflow 1.1.0 or 1.2.0, CUDA 8.0 and Ubuntu 16.04.

Installation

  1. Clone the repository.
    git clone https://github.com/vt-vl-lab/iCAN.git
    
  2. Download V-COCO and HICO-DET dataset. Setup V-COCO and COCO API. Setup HICO-DET evaluation code.
    chmod +x ./misc/download_dataset.sh 
    ./misc/download_dataset.sh 
    
    # Assume you cloned the repository to `iCAN_DIR'.
    # If you have downloaded V-COCO or HICO-DET dataset somewhere else, you can create a symlink
    # ln -s /path/to/your/v-coco/folder Data/
    # ln -s /path/to/your/hico-det/folder Data/
    

Evaluate V-COCO and HICO-DET detection results

  1. Download detection results
    chmod +x ./misc/download_detection_results.sh 
    ./misc/download_detection_results.sh
    
  2. Evaluate V-COCO detection results using iCAN
    python tools/Diagnose_VCOCO.py eval Results/300000_iCAN_ResNet50_VCOCO.pkl
    
  3. Evaluate V-COCO detection results using iCAN (Early fusion)
    python tools/Diagnose_VCOCO.py eval Results/300000_iCAN_ResNet50_VCOCO_Early.pkl
    
  4. Evaluate HICO-DET detection results using iCAN
    cd Data/ho-rcnn
    matlab -r "Generate_detection; quit"
    cd ../../
    
    Here we evaluate our best detection results under Results/HICO_DET/1800000_iCAN_ResNet50_HICO. If you want to evaluate a different detection result, please specify the filename in Data/ho-rcnn/Generate_detection.m accordingly.

Error diagnose on V-COCO

  1. Diagnose V-COCO detection results using iCAN
    python tools/Diagnose_VCOCO.py diagnose Results/300000_iCAN_ResNet50_VCOCO.pkl
    
  2. Diagnose V-COCO detection results using iCAN (Early fusion)
    python tools/Diagnose_VCOCO.py diagnose Results/300000_iCAN_ResNet50_VCOCO_Early.pkl
    

Training

  1. Download COCO pre-trained weights and training data
    chmod +x ./misc/download_training_data.sh 
    ./misc/download_training_data.sh
    
  2. Train an iCAN on V-COCO
    python tools/Train_ResNet_VCOCO.py --model iCAN_ResNet50_VCOCO --num_iteration 300000
    
  3. Train an iCAN (Early fusion) on V-COCO
    python tools/Train_ResNet_VCOCO.py --model iCAN_ResNet50_VCOCO_Early --num_iteration 300000
    
  4. Train an iCAN on HICO-DET
    python tools/Train_ResNet_HICO.py --num_iteration 1800000
    

Testing

  1. Test an iCAN on V-COCO
     python tools/Test_ResNet_VCOCO.py --model iCAN_ResNet50_VCOCO --num_iteration 300000
    
  2. Test an iCAN (Early fusion) on V-COCO
     python tools/Test_ResNet_VCOCO.py --model iCAN_ResNet50_VCOCO_Early --num_iteration 300000
    
  3. Test an iCAN on HICO-DET
    python tools/Test_ResNet_HICO.py --num_iteration 1800000
    

Visualizing V-COCO detections

Check tools/Visualization.ipynb to see how to visualize the detection results.

Demo/Test on your own images

  1. To get the best performance, we use Detectron as our object detector. For a simple demo purpose, we use tf-faster-rcnn in this section instead.
  2. Clone and setup the tf-faster-rcnn repository.
    cd $iCAN_DIR
    chmod +x ./misc/setup_demo.sh 
    ./misc/setup_demo.sh
    
  3. Put your own images to demo/ folder.
  4. Detect all objects
    # images are saved in $iCAN_DIR/demo/
    python ../tf-faster-rcnn/tools/Object_Detector.py --img_dir demo/ --img_format png --Demo_RCNN demo/Object_Detection.pkl
    
  5. Detect all HOIs
    python tools/Demo.py --img_dir demo/ --Demo_RCNN demo/Object_Detection.pkl --HOI_Detection demo/HOI_Detection.pkl
    
  6. Check tools/Demo.ipynb to visualize the detection results.

Citation

If you find this code useful for your research, please consider citing the following papers:

@inproceedings{gao2018ican,
author    = {Gao, Chen and Zou, Yuliang and Huang, Jia-Bin}, 
title     = {iCAN: Instance-Centric Attention Network for Human-Object Interaction Detection}, 
booktitle = {British Machine Vision Conference},
year      = {2018}
}

Acknowledgement

Codes are built upon tf-faster-rcnn. We thank Jinwoo Choi for the code review.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].