Giter VIP home page Giter VIP logo

open-set-hierarchical-attention-har's Introduction

Hierarchical Self Attention Based Autoencoder for Open-Set Human Activity Recognition

This repository is currently being updated, we hope to publish the final version of the code very soon.

  • In order to install the dependencies required for this project in the conda environment:

      conda create --name <env> --file requirements.txt
    
  • Command line argument used for referring dataset names in python scripts are given below:

      [dataset_name]: pamap2 / opp / daphnet / uschad / skoda
    
  • As the size of the datasets is beyond the specified maximum size of code and data submission, all the datasets are not included in this repository. These publicly available datasets can be obtained from the UCI repository through the python script dataset_download.py as per the terminal command given below:

      python dataset_download.py [dataset_name]
    
    • E.g. in order to download raw Opportunity dataset:

        python dataset_download.py opp
      
  • The project contains several packages for various functionality. The project structure is discussed below:

    • configs/: contains YAML files for the specification of hyperparameters and metadata for dataset download, preprocessing, model training, and testing.

    • data/: contains raw and processed datasets for experiments and human-readable map for activity labels of each dataset.

    • model/: contains code for the different modules of the proposed hierarchical self-attention model.

    • preprocessing/: contains necessary python scripts for data cleaning and preprocessing.

    • experiments/: contains python scripts for different experimental setup and sample visualizations of interpretable feature attention maps and diagrams

    • saved_models/: contains trained weights for the hierarchical self-attention model that may be loaded for inference while experimenting with the respective dataset.

    • train.py and test.py: python scripts for model training and testing based on given dataset and hyperparameters arguments.

  • In order to run experiments, please run the file test.py with the following required arguments: The first argument must be the name of the dataset, options are opp, mex, mhealth, pamap2 and realdisp Optional arguments are as follows:

    • save_weights: to save the trained model weights

    • include_novelty_exp: train the VAE on top of the hierarchical attention model and generate results

    • use_pretrained: use pre-trained weights to initialize model instead of training

    • Command for running experiments:

        python test.py [dataset_name] [save_weights] [include_novelty_exp] [use_pretrained]
      
  • E.g. if we want to run experiments on the Opportunity dataset with saved pre-trained weights and conduct the novelty detection experiment, the command should be:

      python test.py opp use_pretrained
    

open-set-hierarchical-attention-har's People

Contributors

saif-mahmud avatar thtonmoy avatar mahbubcseju avatar dependabot[bot] avatar

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.