All Projects → maxstrobel → Hcn Prototypeloss Pytorch

maxstrobel / Hcn Prototypeloss Pytorch

Licence: mit
Hierarchical Co-occurrence Network with Prototype Loss for Few-shot Learning (PyTorch)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Hcn Prototypeloss Pytorch

Metarec
PyTorch Implementations For A Series Of Deep Learning-Based Recommendation Models (IN PROGRESS)
Stars: ✭ 120 (+605.88%)
Mutual labels:  meta-learning, tensorboard
simple-cnaps
Source codes for "Improved Few-Shot Visual Classification" (CVPR 2020), "Enhancing Few-Shot Image Classification with Unlabelled Examples" (WACV 2022), and "Beyond Simple Meta-Learning: Multi-Purpose Models for Multi-Domain, Active and Continual Few-Shot Learning" (Neural Networks 2022 - in submission)
Stars: ✭ 88 (+417.65%)
Mutual labels:  metric-learning, meta-learning
Awesome-Few-shot
Awesome Few-shot learning
Stars: ✭ 50 (+194.12%)
Mutual labels:  metric-learning, meta-learning
TCE
This repository contains the code implementation used in the paper Temporally Coherent Embeddings for Self-Supervised Video Representation Learning (TCE).
Stars: ✭ 51 (+200%)
Mutual labels:  metric-learning, action-recognition
awesome-few-shot-meta-learning
awesome few shot / meta learning papers
Stars: ✭ 44 (+158.82%)
Mutual labels:  metric-learning, meta-learning
LearningToCompare-Tensorflow
Tensorflow implementation for paper: Learning to Compare: Relation Network for Few-Shot Learning.
Stars: ✭ 17 (+0%)
Mutual labels:  metric-learning, meta-learning
Video Classification
Tutorial for video classification/ action recognition using 3D CNN/ CNN+RNN on UCF101
Stars: ✭ 543 (+3094.12%)
Mutual labels:  action-recognition
Prototypical Networks
Code for the NeurIPS 2017 Paper "Prototypical Networks for Few-shot Learning"
Stars: ✭ 705 (+4047.06%)
Mutual labels:  metric-learning
Labml
🔎 Monitor deep learning model training and hardware usage from your mobile phone 📱
Stars: ✭ 508 (+2888.24%)
Mutual labels:  tensorboard
Cfnet
[CVPR'17] Training a Correlation Filter end-to-end allows lightweight networks of 2 layers (600 kB) to high performance at fast speed..
Stars: ✭ 496 (+2817.65%)
Mutual labels:  meta-learning
Learningtocompare fsl
PyTorch code for CVPR 2018 paper: Learning to Compare: Relation Network for Few-Shot Learning (Few-Shot Learning part)
Stars: ✭ 837 (+4823.53%)
Mutual labels:  meta-learning
Bmw Tensorflow Training Gui
This repository allows you to get started with a gui based training a State-of-the-art Deep Learning model with little to no configuration needed! NoCode training with TensorFlow has never been so easy.
Stars: ✭ 736 (+4229.41%)
Mutual labels:  tensorboard
Mmaction2
OpenMMLab's Next Generation Video Understanding Toolbox and Benchmark
Stars: ✭ 684 (+3923.53%)
Mutual labels:  action-recognition
Cartoongan Tensorflow
Generate your own cartoon-style images with CartoonGAN (CVPR 2018), powered by TensorFlow 2.0 Alpha.
Stars: ✭ 587 (+3352.94%)
Mutual labels:  tensorboard
Two Stream Action Recognition
Using two stream architecture to implement a classic action recognition method on UCF101 dataset
Stars: ✭ 705 (+4047.06%)
Mutual labels:  action-recognition
Bmw Yolov4 Training Automation
This repository allows you to get started with training a state-of-the-art Deep Learning model with little to no configuration needed! You provide your labeled dataset or label your dataset using our BMW-LabelTool-Lite and you can start the training right away and monitor it in many different ways like TensorBoard or a custom REST API and GUI. NoCode training with YOLOv4 and YOLOV3 has never been so easy.
Stars: ✭ 533 (+3035.29%)
Mutual labels:  tensorboard
Tf cnnvis
CNN visualization tool in TensorFlow
Stars: ✭ 769 (+4423.53%)
Mutual labels:  tensorboard
Gluon Cv
Gluon CV Toolkit
Stars: ✭ 5,001 (+29317.65%)
Mutual labels:  action-recognition
Pggan Pytorch
🔥🔥 PyTorch implementation of "Progressive growing of GANs (PGGAN)" 🔥🔥
Stars: ✭ 653 (+3741.18%)
Mutual labels:  tensorboard
Few Shot
Repository for few-shot learning machine learning projects
Stars: ✭ 727 (+4176.47%)
Mutual labels:  meta-learning

Hierarchical Co-occurrence Network with Prototype Loss for Few-shot Learning (PyTorch)

Hierarchical Co-occurrence Network from Co-occurrence Feature Learning from Skeleton Data for Action Recognition and Detection with Hierarchical Aggregation [Arxiv Preprint]

Prototype loss training procedure from Prototypical Networks for Few-shot Learning [Arxiv Preprint]

Contributions

  1. PyTorch reimplementation of Hierarchical Co-occurrence Network (HCN)
  2. Application of Prototype loss during training of HCN
  3. Experiments showing that training with prototype loss can achieve similar accuracy

Software architecture inspired by:

Data set

We used the NTU RGB+D Action Recognition Dataset [Arxiv Preprint] for our experiments. The data set has to be downloaded and extracted under ./data/NTU-RGB-D.

Prerequisites

The code is based on Python 3.6. All dependencies are listed in environment.yml.

conda env create -f environment.yml

Usage

Data preparation

NTU RGB+D

To transform raw NTU RGB+D data into numpy array (memmap format ) by this command:

python ./tools/ntu_gendata.py --data_path ./data/NTU-RGB-D/nturgb+d_skeletons --out_folder 'data/NTU-RGB-D'  # default setting
python ./tools/ntu_gendata.py --data_path <path for raw skeleton dataset> --out_folder <path for new dataset>  # custom setting

Training

Experiments can be configured via configuration files (./config) or via command line.

Train standard HCN
$ python run_hcn.py -c config/HCN.yaml --use_gpu -w work_dir/HCN
Train HCN with prototype loss
$ python run_protonet.py -c config/ProtoNet.yaml --use_gpu -w work_dir/Prototype
Command line help
$ python run_hcn.py --help

Results

Run tensorboard to view the results.

$ tensorboard --logdir ./work_dir

We did no parameter tuning to improve the results of Prototype HCN compared to Vanilla HCN.

Prototype HCN @ 100 Epochs Cross-View Cross-Subject
Accuracy 87.0 % 82.2 %
Top-2 accuracy 94.0 % 90.6 %
Top-5 accuracy 98.0 % 96.3 %
Vanilla HCN @ 200 Epochs Cross-View Cross-Subject
Accuracy 89.5 % 83.8 %
Top-2 accuracy 95.65 % 91.7 %
Top-5 accuracy 98.79 % 97.2 %

Screenshot TensorBoard

Confusion matrixes - Vanilla HCN vs Prototype HCN

Citing Hierarchical Co-occurrence Network with Prototype Loss for Few-shot Learning

If you use Hierarchical Co-occurrence Network with Prototype Loss for Few-shot Learning in a scientific publication, I would appreciate references to the source code.

Biblatex entry:

@misc{Hierarchical Co-occurrence Network with Prototype Loss for Few-shot Learning,
  author = {Strobel, Max},
  title = {HCN-PrototypeLoss-PyTorch},
  year = {2018},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/maxstrobel/HCN-PrototypeLoss-PyTorch}}
}
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].