Git Product home page Git Product logo

simhit's Introduction

๐ŸŽˆ SimHIT: A Simple Framework for HIT Pattern Recognition Experiment ๐ŸŽˆ

Train and Eval ๐Ÿš€

  • Clone
git clone [email protected]:whlzy/SimHIT.git
cd PR_EXP
  • You should modify the path of config/exp_mlp/test_hardswish.yml or config/exp_mlp/test_relu.yml to your local dataset path.
cd config/exp_mlp
cat test_relu.yml
...
...
  • You can choose gpu or cpu in the config/exp_mlp/test_hardswish.yml or config/exp_mlp/test_relu.yml.

  • You can run the script.

cd ../..
sh scripts/train_hardswish.sh
sh scripts/train_relu.sh
  • You can change the net config in the config/exp_mlp/test_hardswish.yml or config/exp_mlp/test_relu.yml.

  • You can add some new experiments with just adding new script in scripts and new yaml file in config.

  • You can add new dataset in src/data, but maybe need to change some codes.

  • You can rewrite a new training code like train_mlp.py using src/runner.py. src/runner.py is a class which assembles partial training process and config process. You just need to use the src/runner.py and rewrite set_data, set_model, train_one_epoch and test_one_epoch like train_mlp.py. Like the train_mlp.py, you can freely modify the network and modify the training process in train_one_epoch.

DataParallel(DP) and DistributedDataParallel(DDP) training

Note: If you want to use DP:

  1. you need add "dp: True" to "basic" in your config.yml file.

Note: If you want to use DDP:

  1. you need add "ddp: your port" to "basic" in your config.yml file.
  2. please remember to add "if rank == 0:".
  3. please remember to modify the sampler in torch.utils.data.DataLoader.
  4. you need a slurm environment.

Note: If you don't need dp or ddp, you can just delete the "dp: True" and "ddp: your port".

EXP Log ๐Ÿ“–

EXP log is in the exp/*/test_hardswish.

The output.log is logged by mmcv logging in the exp/*/test_hardswish/output.log.

The config you used is written in the exp/*/test_hardswish/config.yaml.

The tensorboard log is in the exp/*/test_hardswish/logdir.

The best checkpoint is in the exp/*/test_hardswish/checkpoint/best/model_best.pth.

PR_Experiment โšก

  • train mlp.
sh scripts/train_hardswish.sh
sh scripts/train_relu.sh
  • train alexnet.
sh scripts/train_AlexNet.sh
  • train resnet18.
sh scripts/train_resnet18.sh

Results ๐Ÿ“Š

Dataset Model Accuracy Tip
MNIST MLP_4layers_Hardswish 98.16%
Caltech101 AlexNet 71.46%
PlantSeedlings ResNet50 98.34%

Environment Note ๐Ÿ””

You need install following packages:

thop
yaml
tqdm
pytorch >= 1.6
skimage <= 0.16.2

License โญ

This project is released under the Apache 2.0 license.

Acknowledgement

Our code is partially borrowed from MMCV and IMDN. Thanks Yiting Zhang and Junjing huang for their help.

Citation

If you find this project useful in your research, please consider to cite.

@misc{SimHIT,
    title={SimHIT: A Simple Framework for HIT Pattern Recognition Experiment},
    author={Zeyu Lu},
    howpublished = {\url{https://github.com/whlzy/SimHIT}},
    year={2022}
}

simhit's People

Contributors

whlzy avatar yiting1009 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.