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
ICLR 2021, Fair Mixup: Fairness via Interpolation

Fair Mixup: Fairness via Interpolation Training classifiers under fairness constraints such as group fairness, regularizes the disparities of predicti

Ching-Yao Chuang 49 Nov 22, 2022
A PyTorch implementation of the paper Mixup: Beyond Empirical Risk Minimization in PyTorch

Mixup: Beyond Empirical Risk Minimization in PyTorch This is an unofficial PyTorch implementation of mixup: Beyond Empirical Risk Minimization. The co

Harry Yang 121 Dec 17, 2022
OpenMMLab Detection Toolbox and Benchmark

MMDetection is an open source object detection toolbox based on PyTorch. It is a part of the OpenMMLab project.

OpenMMLab 22.5k Jan 5, 2023
OpenMMLab Semantic Segmentation Toolbox and Benchmark.

Documentation: https://mmsegmentation.readthedocs.io/ English | 简体中文 Introduction MMSegmentation is an open source semantic segmentation toolbox based

OpenMMLab 5k Dec 31, 2022
OpenMMLab's Next Generation Video Understanding Toolbox and Benchmark

Introduction English | 简体中文 MMAction2 is an open-source toolbox for video understanding based on PyTorch. It is a part of the OpenMMLab project. The m

OpenMMLab 2.7k Jan 7, 2023
OpenMMLab Pose Estimation Toolbox and Benchmark.

Introduction English | 简体中文 MMPose is an open-source toolbox for pose estimation based on PyTorch. It is a part of the OpenMMLab project. The master b

OpenMMLab 2.8k Dec 31, 2022
An open-access benchmark and toolbox for electricity price forecasting

epftoolbox The epftoolbox is the first open-access library for driving research in electricity price forecasting. Its main goal is to make available a

null 97 Dec 5, 2022
Implementation of the paper All Labels Are Not Created Equal: Enhancing Semi-supervision via Label Grouping and Co-training

SemCo The official pytorch implementation of the paper All Labels Are Not Created Equal: Enhancing Semi-supervision via Label Grouping and Co-training

null 42 Nov 14, 2022
[CVPR 2021] Semi-Supervised Semantic Segmentation with Cross Pseudo Supervision

TorchSemiSeg [CVPR 2021] Semi-Supervised Semantic Segmentation with Cross Pseudo Supervision by Xiaokang Chen1, Yuhui Yuan2, Gang Zeng1, Jingdong Wang

Chen XiaoKang 387 Jan 8, 2023
WRENCH: Weak supeRvision bENCHmark

?? What is it? Wrench is a benchmark platform containing diverse weak supervision tasks. It also provides a common and easy framework for development

Jieyu Zhang 176 Dec 28, 2022
WRENCH: Weak supeRvision bENCHmark

?? What is it? Wrench is a benchmark platform containing diverse weak supervision tasks. It also provides a common and easy framework for development

Jieyu Zhang 176 Dec 28, 2022
CoSMA: Convolutional Semi-Regular Mesh Autoencoder. From Paper "Mesh Convolutional Autoencoder for Semi-Regular Meshes of Different Sizes"

Mesh Convolutional Autoencoder for Semi-Regular Meshes of Different Sizes Implementation of CoSMA: Convolutional Semi-Regular Mesh Autoencoder arXiv p

Fraunhofer SCAI 10 Oct 11, 2022
Official PyTorch code for CVPR 2020 paper "Deep Active Learning for Biased Datasets via Fisher Kernel Self-Supervision"

Deep Active Learning for Biased Datasets via Fisher Kernel Self-Supervision https://arxiv.org/abs/2003.00393 Abstract Active learning (AL) aims to min

Denis 29 Nov 21, 2022
[CVPR 2022] PoseTriplet: Co-evolving 3D Human Pose Estimation, Imitation, and Hallucination under Self-supervision (Oral)

PoseTriplet: Co-evolving 3D Human Pose Estimation, Imitation, and Hallucination under Self-supervision Kehong Gong*, Bingbing Li*, Jianfeng Zhang*, Ta

null 256 Dec 28, 2022
Self-training with Weak Supervision (NAACL 2021)

This repo holds the code for our weak supervision framework, ASTRA, described in our NAACL 2021 paper: "Self-Training with Weak Supervision"

Microsoft 148 Nov 20, 2022
Improving Transferability of Representations via Augmentation-Aware Self-Supervision

Improving Transferability of Representations via Augmentation-Aware Self-Supervision Accepted to NeurIPS 2021 TL;DR: Learning augmentation-aware infor

hankook 38 Sep 16, 2022
Code release for SLIP Self-supervision meets Language-Image Pre-training

SLIP: Self-supervision meets Language-Image Pre-training What you can find in this repo: Pre-trained models (with ViT-Small, Base, Large) and code to

Meta Research 621 Dec 31, 2022
A library built upon PyTorch for building embeddings on discrete event sequences using self-supervision

pytorch-lifestream a library built upon PyTorch for building embeddings on discrete event sequences using self-supervision. It can process terabyte-si

Dmitri Babaev 103 Dec 17, 2022