Mixup for Supervision, Semi- and Self-Supervision Learning Toolbox and Benchmark

Overview

OpenSelfSup

News

  • Downstream tasks now support more methods(Mask RCNN-FPN, RetinaNet, Keypoints RCNN) and more datasets(Cityscapes).
  • 'GaussianBlur' is replaced from Opencv to PIL, and MoCo v2 training speed doubles!
    (time/iter 0.35s-->0.16s, SimCLR and BYOL are also affected.)
  • OpenSelfSup now supports Mixed Precision Training (apex AMP)!
  • A bug of MoCo v2 has been fixed and now the results are reproducible.
  • OpenSelfSup now supports BYOL!

Introduction

The master branch works with PyTorch 1.1 or higher.

OpenSelfSup is an open source unsupervised representation learning toolbox based on PyTorch.

What does this repo do?

Below is the relations among Unsupervised Learning, Self-Supervised Learning and Representation Learning. This repo focuses on the shadow area, i.e., Unsupervised Representation Learning. Self-Supervised Representation Learning is the major branch of it. Since in many cases we do not distingush between Self-Supervised Representation Learning and Unsupervised Representation Learning strictly, we still name this repo as OpenSelfSup.

Major features

  • All methods in one repository

    For comprehensive comparison in all benchmarks, refer to MODEL_ZOO.md. Most of the selfsup pretraining methods are under the batch_size=256, epochs=200 setting.

    Method VOC07 SVM (best layer) ImageNet (best layer)
    ImageNet 87.17 76.17
    Random 30.54 16.21
    Relative-Loc 64.78 49.31
    Rotation-Pred 67.38 54.99
    DeepCluster 74.26 57.71
    NPID 74.50 56.61
    ODC 78.42 57.70
    MoCo 79.18 60.60
    MoCo v2 84.26 67.69
    SimCLR 78.95 61.57
    BYOL (epoch=300) 86.58 72.35
    • Flexibility & Extensibility

      OpenSelfSup follows a similar code architecture of MMDetection while is even more flexible than MMDetection, since OpenSelfSup integrates various self-supervised tasks including classification, joint clustering and feature learning, contrastive learning, tasks with a memory bank, etc.

      For existing methods in this repo, you only need to modify config files to adjust hyper-parameters. It is also simple to design your own methods, please refer to GETTING_STARTED.md.

    • Efficiency

      All methods support multi-machine multi-gpu distributed training.

    • Standardized Benchmarks

      We standardize the benchmarks including logistic regression, SVM / Low-shot SVM from linearly probed features, semi-supervised classification, and object detection. Below are the setting of these benchmarks.

      Benchmarks Setting Remarks
      ImageNet Linear Classification (Multi) goyal2019scaling Evaluate different layers.
      ImageNet Linear Classification (Last) MoCo Evaluate the last layer after global pooling.
      Places205 Linear Classification goyal2019scaling Evaluate different layers.
      ImageNet Semi-Sup Classification
      PASCAL VOC07 SVM goyal2019scaling Costs="1.0,10.0,100.0" to save evaluation time w/o change of results.
      PASCAL VOC07 Low-shot SVM goyal2019scaling Costs="1.0,10.0,100.0" to save evaluation time w/o change of results.
      PASCAL VOC07+12 Object Detection MoCo
      COCO17 Object Detection MoCo

    Change Log

    Please refer to CHANGELOG.md for details and release history.

    [2020-10-14] OpenSelfSup v0.3.0 is released with some bugs fixed and support of new features.

    [2020-06-26] OpenSelfSup v0.2.0 is released with benchmark results and support of new features.

    [2020-06-16] OpenSelfSup v0.1.0 is released.

    Installation

    Please refer to INSTALL.md for installation and dataset preparation.

    Get Started

    Please see GETTING_STARTED.md for the basic usage of OpenSelfSup.

    Benchmark and Model Zoo

    Please refer to MODEL_ZOO.md for for a comprehensive set of pre-trained models and benchmarks.

    License

    This project is released under the Apache 2.0 license.

    Acknowledgement

    • This repo borrows the architecture design and part of the code from MMDetection.
    • The implementation of MoCo and the detection benchmark borrow the code from moco.
    • The SVM benchmark borrows the code from fair_self_supervision_benchmark.
    • openselfsup/third_party/clustering.py is borrowed from deepcluster.

    Contributors

    We encourage researchers interested in Self-Supervised Learning to contribute to OpenSelfSup. Your contributions, including implementing or transferring new methods to OpenSelfSup, performing experiments, reproducing of results, parameter studies, etc, will be recorded in MODEL_ZOO.md. For now, the contributors include: Xiaohang Zhan (@XiaohangZhan), Jiahao Xie (@Jiahao000), Enze Xie (@xieenze), Xiangxiang Chu (@cxxgtxy), Zijian He (@scnuhealthy).

    Contact

    This repo is currently maintained by Xiaohang Zhan (@XiaohangZhan), Jiahao Xie (@Jiahao000) and Enze Xie (@xieenze).

Comments
  • [Feature] Can we load ImageNet data using LMDB?

    [Feature] Can we load ImageNet data using LMDB?

    Describe the feature

    Current ImageNet data loader can only support pillow, cv2 backends to load images. By some reasone, I need to use LMDB to load dataset which is supported by mmcls. https://github.com/Westlake-AI/openmixup/blob/8966870a05b85ea940a02c4646693ec101ab0575/openmixup/datasets/data_sources/image_list.py#L49-L51

    enhancement 
    opened by wang-tf 4
  • Question about the invTrans in the visualization code for automix

    Question about the invTrans in the visualization code for automix

    Hi, thank you for your great work. I found that the invTrans in the visualization code for automix use cifar dataset's mean & std by default. Will it work when i input the imagenet images?

    https://github.com/Westlake-AI/openmixup/blob/90dab92464e94ac5c4139c37f07ed21df9c2affb/openmixup/models/classifiers/automix_V1plus.py#L353

    help wanted 
    opened by mrbulb 4
  • How to convert model output to torchscript file?

    How to convert model output to torchscript file?

    Checklist

    • I have searched related issues but cannot get the expected help.
    • I have read related documents and don't know what to do.

    Describe the question you meet

    I already using config modified from MogaNet to train the perfect model, but I need to convert it to torchscript. How to convert the .pth to torchscript(.pt), I try the general method but get error, because the .pth file only contains the weight, and not contains the model.

    如何能转换模型文件到 TorchScript 格式? 我已经使用修改的 MogaNet 配置文件训练出了一个良好的模型,但是我需要转换 .pth 文件到 .pt 文件,即 TorchScript 格式。 如何转换模型输出文件 .pth 到 TorchScript?我尝试了一些通用方法,但是不能成功,因为 .pth 文件仅仅包含权重,并不包含模型网络。

    help wanted 
    opened by nikbobo 3
  • Where will I get the pretrained code for moganet?

    Where will I get the pretrained code for moganet?

    Checklist

    • I have searched related issues but cannot get the expected help.
    • I have read related documents and don't know what to do.

    Describe the question you meet

    [here]

    Post related information

    1. The output of pip list | grep "mmcv\|mmcls\|^torch" [here]
    2. Your config file if you modified it or created a new one.
    [here]
    
    1. Your train log file if you meet the problem during training. [here]
    2. Other code you modified in the mmcls folder. [here]
    help wanted 
    opened by M-SunRise 3
  • there is a problem when i run :python setup.py develop

    there is a problem when i run :python setup.py develop

    when i run:python setup.py develop,there is a problem,i paste it down here

    running develop
    C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\command\easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards
    -based tools.
      warnings.warn(
    C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tool
    s.
      warnings.warn(
    running egg_info
    writing openmixup.egg-info\PKG-INFO
    writing dependency_links to openmixup.egg-info\dependency_links.txt
    writing requirements to openmixup.egg-info\requires.txt
    writing top-level names to openmixup.egg-info\top_level.txt
    reading manifest file 'openmixup.egg-info\SOURCES.txt'
    adding license file 'LICENSE'
    writing manifest file 'openmixup.egg-info\SOURCES.txt'
    running build_ext
    Creating c:\users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\openmixup.egg-link (link to .)
    openmixup 0.2.5+90dab92 is already the active version in easy-install.pth
    
    Installed d:\python_projects\openmixup
    Processing dependencies for openmixup==0.2.5+90dab92
    Searching for faiss-gpu==1.6.1
    Reading https://pypi.org/simple/faiss-gpu/
    C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\pkg_resources\__init__.py:123: PkgResourcesDeprecationWarning: gpu-1.5.3 is an invalid version and will not be supported in a future release
      warnings.warn(
    C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\pkg_resources\__init__.py:123: PkgResourcesDeprecationWarning:  is an invalid version and will not be supported in a future release
      warnings.warn(
    C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\pkg_resources\__init__.py:123: PkgResourcesDeprecationWarning: gpu-1.6.0 is an invalid version and will not be supported in a future release
      warnings.warn(
    C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\pkg_resources\__init__.py:123: PkgResourcesDeprecationWarning: gpu-1.6.1 is an invalid version and will not be supported in a future release
      warnings.warn(
    C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\pkg_resources\__init__.py:123: PkgResourcesDeprecationWarning: gpu-1.6.3 is an invalid version and will not be supported in a future release
      warnings.warn(
    C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\pkg_resources\__init__.py:123: PkgResourcesDeprecationWarning: gpu-1.6.4 is an invalid version and will not be supported in a future release
      warnings.warn(
    C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\pkg_resources\__init__.py:123: PkgResourcesDeprecationWarning: gpu-1.6.4.post2 is an invalid version and will not be supported in a future relea
    se
      warnings.warn(
    C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\pkg_resources\__init__.py:123: PkgResourcesDeprecationWarning: gpu-1.6.5 is an invalid version and will not be supported in a future release
      warnings.warn(
    C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\pkg_resources\__init__.py:123: PkgResourcesDeprecationWarning: gpu-1.7.0 is an invalid version and will not be supported in a future release
      warnings.warn(
    C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\pkg_resources\__init__.py:123: PkgResourcesDeprecationWarning: gpu-1.7.1 is an invalid version and will not be supported in a future release
      warnings.warn(
    C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\pkg_resources\__init__.py:123: PkgResourcesDeprecationWarning: gpu-1.7.1.post1 is an invalid version and will not be supported in a future relea
    se
      warnings.warn(
    C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\pkg_resources\__init__.py:123: PkgResourcesDeprecationWarning: gpu-1.7.1.post2 is an invalid version and will not be supported in a future relea
    se
      warnings.warn(
    Downloading https://files.pythonhosted.org/packages/1d/d4/290ed049631dc061843920cd6e2b5d9af25cb5c98cb7ecbe2b7ca4bebf12/faiss-gpu-1.6.1.tar.gz#sha256=7a280e951d305d654a116b9f31275169f30841c8b851f0d689421ef8a
    3ecf7b8
    Best match: faiss-gpu 1.6.1
    Processing faiss-gpu-1.6.1.tar.gz
    Writing C:\Users\SHAOSH~1\AppData\Local\Temp\easy_install-3zs3m1q3\faiss-gpu-1.6.1\setup.cfg
    Running faiss-gpu-1.6.1\setup.py -q bdist_egg --dist-dir C:\Users\SHAOSH~1\AppData\Local\Temp\easy_install-3zs3m1q3\faiss-gpu-1.6.1\egg-dist-tmp-snlcnz4n
    C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tool
    s.
      warnings.warn(
    Traceback (most recent call last):
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\sandbox.py", line 156, in save_modules
        yield saved
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\sandbox.py", line 198, in setup_context
        yield
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\sandbox.py", line 259, in run_setup
        _execfile(setup_script, ns)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\sandbox.py", line 46, in _execfile
        exec(code, globals, locals)
      File "C:\Users\SHAOSH~1\AppData\Local\Temp\easy_install-3zs3m1q3\faiss-gpu-1.6.1\setup.py", line 91, in <module>
    
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\__init__.py", line 87, in setup
        return distutils.core.setup(**attrs)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
        return run_commands(dist)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
        dist.run_commands()
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_commands
        self.run_command(cmd)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\dist.py", line 1217, in run_command
        super().run_command(command)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\_distutils\dist.py", line 992, in run_command
        cmd_obj.run()
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\command\bdist_egg.py", line 165, in run
        cmd = self.call_command('install_lib', warn_dir=0)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\command\bdist_egg.py", line 151, in call_command
        self.run_command(cmdname)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\_distutils\cmd.py", line 319, in run_command
        self.distribution.run_command(command)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\dist.py", line 1217, in run_command
        super().run_command(command)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\_distutils\dist.py", line 992, in run_command
        cmd_obj.run()
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\command\install_lib.py", line 11, in run
        self.build()
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\_distutils\command\install_lib.py", line 112, in build
        self.run_command('build_ext')
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\_distutils\cmd.py", line 319, in run_command
        self.distribution.run_command(command)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\dist.py", line 1217, in run_command
        super().run_command(command)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\_distutils\dist.py", line 992, in run_command
        cmd_obj.run()
      File "C:\Users\SHAOSH~1\AppData\Local\Temp\easy_install-3zs3m1q3\faiss-gpu-1.6.1\setup.py", line 45, in run
        sha = out.strip().decode('ascii')
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 346, in run
        self.build_extensions()
      File "C:\Users\SHAOSH~1\AppData\Local\Temp\easy_install-3zs3m1q3\faiss-gpu-1.6.1\setup.py", line 50, in build_extensions
    
      File "C:\Users\SHAOSH~1\AppData\Local\Temp\easy_install-3zs3m1q3\faiss-gpu-1.6.1\setup.py", line 58, in _remove_flag
        sha = __version__.split('+')[-1]
    AttributeError: 'MSVCCompiler' object has no attribute 'compiler'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "setup.py", line 168, in <module>
        setup(
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\__init__.py", line 87, in setup
        return distutils.core.setup(**attrs)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
        return run_commands(dist)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
        dist.run_commands()
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_commands
        self.run_command(cmd)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\dist.py", line 1217, in run_command
        super().run_command(command)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\_distutils\dist.py", line 992, in run_command
        cmd_obj.run()
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\command\develop.py", line 34, in run
        self.install_for_development()
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\command\develop.py", line 129, in install_for_development
        self.process_distribution(None, self.dist, not self.no_deps)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\command\easy_install.py", line 754, in process_distribution
        distros = WorkingSet([]).resolve(
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\pkg_resources\__init__.py", line 789, in resolve
        dist = best[req.key] = env.best_match(
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\pkg_resources\__init__.py", line 1075, in best_match
        return self.obtain(req, installer)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\pkg_resources\__init__.py", line 1087, in obtain
        return installer(requirement)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\command\easy_install.py", line 681, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\command\easy_install.py", line 707, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\command\easy_install.py", line 900, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\command\easy_install.py", line 1174, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\command\easy_install.py", line 1158, in run_setup
        run_setup(setup_script, args)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\sandbox.py", line 262, in run_setup
        raise
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\contextlib.py", line 131, in __exit__
        self.gen.throw(type, value, traceback)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\sandbox.py", line 198, in setup_context
        yield
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\contextlib.py", line 131, in __exit__
        self.gen.throw(type, value, traceback)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\sandbox.py", line 169, in save_modules
        saved_exc.resume()
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\sandbox.py", line 143, in resume
        raise exc.with_traceback(self._tb)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\sandbox.py", line 156, in save_modules
        yield saved
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\sandbox.py", line 198, in setup_context
        yield
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\sandbox.py", line 259, in run_setup
        _execfile(setup_script, ns)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\sandbox.py", line 46, in _execfile
        exec(code, globals, locals)
      File "C:\Users\SHAOSH~1\AppData\Local\Temp\easy_install-3zs3m1q3\faiss-gpu-1.6.1\setup.py", line 91, in <module>
    
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\__init__.py", line 87, in setup
        return distutils.core.setup(**attrs)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
        return run_commands(dist)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
        dist.run_commands()
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_commands
        self.run_command(cmd)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\dist.py", line 1217, in run_command
        super().run_command(command)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\_distutils\dist.py", line 992, in run_command
        cmd_obj.run()
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\command\bdist_egg.py", line 165, in run
        cmd = self.call_command('install_lib', warn_dir=0)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\command\bdist_egg.py", line 151, in call_command
        self.run_command(cmdname)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\_distutils\cmd.py", line 319, in run_command
        self.distribution.run_command(command)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\dist.py", line 1217, in run_command
        super().run_command(command)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\_distutils\dist.py", line 992, in run_command
        cmd_obj.run()
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\command\install_lib.py", line 11, in run
        self.build()
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\_distutils\command\install_lib.py", line 112, in build
        self.run_command('build_ext')
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\_distutils\cmd.py", line 319, in run_command
        self.distribution.run_command(command)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\dist.py", line 1217, in run_command
        super().run_command(command)
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\_distutils\dist.py", line 992, in run_command
        cmd_obj.run()
      File "C:\Users\SHAOSH~1\AppData\Local\Temp\easy_install-3zs3m1q3\faiss-gpu-1.6.1\setup.py", line 45, in run
        sha = out.strip().decode('ascii')
      File "C:\Users\shaoshuai\anaconda3\envs\openmixup\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 346, in run
        self.build_extensions()
      File "C:\Users\SHAOSH~1\AppData\Local\Temp\easy_install-3zs3m1q3\faiss-gpu-1.6.1\setup.py", line 50, in build_extensions
    
      File "C:\Users\SHAOSH~1\AppData\Local\Temp\easy_install-3zs3m1q3\faiss-gpu-1.6.1\setup.py", line 58, in _remove_flag
        sha = __version__.split('+')[-1]
    AttributeError: 'MSVCCompiler' object has no attribute 'compiler'
    

    It looks like can't install faiss.I try to install faiss through pip command,but don't work. Please help me.

    help wanted 
    opened by 774911840 3
  • Where can we find the Resnet fine-tuning config file for A2MIM?

    Where can we find the Resnet fine-tuning config file for A2MIM?

    Checklist

    • I have searched related issues but cannot get the expected help.
    • I have read related documents and don't know what to do.

    Describe the question you meet

    In this page, I can not find the Fine-tuning Config for ResNet-50. There is a likely config(configs/benchmarks/classification/imagenet/r50_rsb_a2_ft_sz224_8xb256_cos_fp16_ep100.py) in the directory. Is it the right cofnig file?

    help wanted 
    opened by wang-tf 2
  • Update New Features and Update Documents in V0.2.6

    Update New Features and Update Documents in V0.2.6

    Updating features:

    1. Support new self-supervised method BEiT with ViT-Base on ImageNet-1K, and fix bugs of CAE, MaskFeat, and SimMIM in Dataset, Model, and Head. Note that we added HOG feature implementation borrowed from the original repo for MaskFeat.
    2. Support new backbone architecture DeiT-3 and provide configs.
    3. Update pre-training and fine-tuning config files, and documents for the relevant masked image modeling (MIM) methods (BEiT, MaskFeat, CAE, and A2MIM).
    4. Support Grad-CAM visualization tools vis_cam.py of supported architectures.

    Updating documents:

    1. Update the template and add the latest paper lists of mixup and MIM methods in Awesome Mixups and Awesome MIM.
    2. Update documents of tools.
    bug documentation enhancement 
    opened by Lupin1998 2
  • SAMix Configs for TinyImageNet

    SAMix Configs for TinyImageNet

    Hey, would it be possible to get SAMix Resnet 18 config files for TinyImageNet? I'm trying to adapt the CIFAR-100 config to Tiny but I'm running into shape mismatch issues. Thank you.

    update 
    opened by aswathn1 2
  • No module named 'openmixup'

    No module named 'openmixup'

    Hi authors, Thanks for your great work. When I run the script following your GETTING_STARTED.md, it returns me "no module named ''openmixup". When I tried to import openmixup in python directly, it tells me "no module named 'openmixup.version'". It seems that the version.py file in in the .gitignore list. Is this the reason for the error?

    bug 
    opened by xiangyu8 2
  • Refactoring and Support New Methods and Documents (V0.2.7)

    Refactoring and Support New Methods and Documents (V0.2.7)

    Code refactoring:

    1. Refactor openmixup.core (instead of openmixup.hooks) and openmixup.models.augments (contains mixup augmentation methods which are originally implemented in openmixup.models.utils). After code refactoring, the macro design of OpenMixup is similar to most projects of MMLab.
    2. Support deployment of ONNX and TorchScript in openmixup.core.export and tools/deployment. We refactored the abstract class BaseModel (implemented in openmixup/models/classifiers/base_model.py) to support forward_inference (for custom inference and visualization). We also refactored openmixup.models.heads and openmixup.models.losses to support forward_inference. You can deploy the classification models in OpenMixup according to deployment tutorials.
    3. Support testing API methods in openmixup/apis/test.py for evaluation and deployment of classification models.
    4. Refactor openmixup.core.optimizers to separate optimizers and builders and support the latest Adan optimizer.

    Supporting new features:

    1. Support detailed usage instructions in README of config files for image classification methods in configs/classification, e.g., mixups on ImageNet. We will update READMEs of other methods in configs/selfsup and configs/semisup in a few weeks.
    2. Refine the origianzation of README files according to README-Template.
    3. Support the new mixup augmentation method (AlignMix) and provide the relevant config files in various datasets.

    Updating documents:

    1. Update documents of mixup benchmarks on ImageNet in Model_Zoo_sup.md. Update config files for supported mixup methods.
    2. Update formats (figures, introductions and content tables) of awesome lists in Awesome Mixups and Awesome MIM and provide the latest methods.
    enhancement update Refactoring 
    opened by Lupin1998 1
  • Release Models of MogaNet and Update Features in V0.2.6

    Release Models of MogaNet and Update Features in V0.2.6

    Updateing new features:

    1. Fix the classification heads and update implementations and config files of AlexNet and InceptionV3.

    Uploading Benchmark Results (release):

    1. Updating mixup benchmarks on ImageNet as provided in AutoMix and update results in Model_Zoo_sup.md.
    2. Release pre-trained models and logs of MogaNet.

    Updating documents:

    1. Update documents of mixup benchmarks on ImageNet with new backbones in Model_Zoo_sup.md.
    2. Update awesome lists in Awesome Mixups and Awesome MIM and provide teaser figures of most papers as illustrations.
    documentation enhancement update 
    opened by Lupin1998 1
  • [Feature] Migration to OpenMMLab 2.0 framework.

    [Feature] Migration to OpenMMLab 2.0 framework.

    Describe the feature

    Hi, OpenMixup Team.

    We have release the OpenMMLab 2.0 framework, and release the new version of MMClassification and MMSelfSup.

    We also introduce the new features in these two blogs.

    • https://zhuanlan.zhihu.com/p/574842341
    • https://zhuanlan.zhihu.com/p/573317958

    If you think the new features are useful to your project, feel free to try or migrate to OpenMMLab 2.0 framework.

    MMClassification/MMSelfSup Team.

    enhancement 
    opened by tonysy 1
  • AutoMix tutorial that is independent of MMClassification

    AutoMix tutorial that is independent of MMClassification

    Dear Authors,

    Inspiring work! Could you please provide a simplified demo/tutorial of how to use AutoMix in general PyTorch training? I have no experience of using OpenMMLab-style framework. A small demo like google colab notebook would be of great help!

    Thanks!

    help wanted 
    opened by lofrienger 1
Releases(moganet-in1k-weights)
Owner
AI Lab, Westlake University
AI Lab, Westlake University
Tacotron 2 - PyTorch implementation with faster-than-realtime inference

Tacotron 2 (without wavenet) PyTorch implementation of Natural TTS Synthesis By Conditioning Wavenet On Mel Spectrogram Predictions. This implementati

NVIDIA Corporation 4.1k Jan 03, 2023
This code is for our paper "VTGAN: Semi-supervised Retinal Image Synthesis and Disease Prediction using Vision Transformers"

ICCV Workshop 2021 VTGAN This code is for our paper "VTGAN: Semi-supervised Retinal Image Synthesis and Disease Prediction using Vision Transformers"

Sharif Amit Kamran 25 Dec 08, 2022
Facilitating Database Tuning with Hyper-ParameterOptimization: A Comprehensive Experimental Evaluation

A Comprehensive Experimental Evaluation for Database Configuration Tuning This is the source code to the paper "Facilitating Database Tuning with Hype

DAIR Lab 9 Oct 29, 2022
Statistical-Rethinking-with-Python-and-PyMC3 - Python/PyMC3 port of the examples in " Statistical Rethinking A Bayesian Course with Examples in R and Stan" by Richard McElreath

Statistical Rethinking with Python and PyMC3 This repository has been deprecated in favour of this one, please check that repository for updates, for

Osvaldo Martin 786 Dec 29, 2022
GNN-based Recommendation Benchma

GRecX A Fair Benchmark for GNN-based Recommendation Preliminary Comparison DiffNet-Yelp dataset (featureless) Algo 73 Oct 17, 2022

Colossal-AI: A Unified Deep Learning System for Large-Scale Parallel Training

ColossalAI An integrated large-scale model training system with efficient parallelization techniques. arXiv: Colossal-AI: A Unified Deep Learning Syst

HPC-AI Tech 7.9k Jan 08, 2023
Simple tools for logging and visualizing, loading and training

TNT TNT is a library providing powerful dataloading, logging and visualization utilities for Python. It is closely integrated with PyTorch and is desi

1.5k Jan 02, 2023
True per-item rarity for Loot

True-Rarity True per-item rarity for Loot (For Adventurers) and More Loot A.K.A mLoot each out/true_rarity_{item_type}.json file contains probabilitie

Dan R. 3 Jul 26, 2022
Boundary IoU API (Beta version)

Boundary IoU API (Beta version) Bowen Cheng, Ross Girshick, Piotr Dollár, Alexander C. Berg, Alexander Kirillov [arXiv] [Project] [BibTeX] This API is

Bowen Cheng 177 Dec 29, 2022
PyExplainer: A Local Rule-Based Model-Agnostic Technique (Explainable AI)

PyExplainer PyExplainer is a local rule-based model-agnostic technique for generating explanations (i.e., why a commit is predicted as defective) of J

AI Wizards for Software Management (AWSM) Research Group 14 Nov 13, 2022
A C implementation for creating 2D voronoi diagrams

Branch OSX/Linux Windows master dev jc_voronoi A fast C/C++ header only implementation for creating 2D Voronoi diagrams from a point set Uses Fortune'

Mathias Westerdahl 481 Dec 29, 2022
Voxel Set Transformer: A Set-to-Set Approach to 3D Object Detection from Point Clouds (CVPR 2022)

Voxel Set Transformer: A Set-to-Set Approach to 3D Object Detection from Point Clouds (CVPR2022)[paper] Authors: Chenhang He, Ruihuang Li, Shuai Li, L

Billy HE 141 Dec 30, 2022
Regression Metrics Calculation Made easy for tensorflow2 and scikit-learn

Regression Metrics Installation To install the package from the PyPi repository you can execute the following command: pip install regressionmetrics I

Ashish Patel 11 Dec 16, 2022
This repo is about implementing different approaches of pose estimation and also is a sub-task of the smart hospital bed project :smile:

Pose-Estimation This repo is a sub-task of the smart hospital bed project which is about implementing the task of pose estimation 😄 Many thanks to th

Max 11 Oct 17, 2022
MonoRec: Semi-Supervised Dense Reconstruction in Dynamic Environments from a Single Moving Camera

MonoRec: Semi-Supervised Dense Reconstruction in Dynamic Environments from a Single Moving Camera

Felix Wimbauer 494 Jan 06, 2023
Help you understand Manual and w/ Clutch point while driving.

简体中文 forza_auto_gear forza_auto_gear is a tool for Forza Horizon 5. It will help us understand the best gear shift point using Manual or w/ Clutch in

15 Oct 08, 2022
This is the official implementation of VaxNeRF (Voxel-Accelearated NeRF).

VaxNeRF Paper | Google Colab This is the official implementation of VaxNeRF (Voxel-Accelearated NeRF). This codebase is implemented using JAX, buildin

naruya 132 Nov 21, 2022
Implementation of Memory-Compressed Attention, from the paper "Generating Wikipedia By Summarizing Long Sequences"

Memory Compressed Attention Implementation of the Self-Attention layer of the proposed Memory-Compressed Attention, in Pytorch. This repository offers

Phil Wang 47 Dec 23, 2022
UDP++ (ECCVW 2020 Oral), (Winner of COCO 2020 Keypoint Challenge).

UDP-Pose This is the pytorch implementation for UDP++, which won the Fisrt place in COCO Keypoint Challenge at ECCV 2020 Workshop. Top-Down Results on

20 Jul 29, 2022
OptNet: Differentiable Optimization as a Layer in Neural Networks

OptNet: Differentiable Optimization as a Layer in Neural Networks This repository is by Brandon Amos and J. Zico Kolter and contains the PyTorch sourc

CMU Locus Lab 428 Dec 24, 2022