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
Data and extra materials for the food safety publications classifier

Data and extra materials for the food safety publications classifier The subdirectories contain detailed descriptions of their contents in the README.

1 Jan 20, 2022
Official Pytorch implementation of 'GOCor: Bringing Globally Optimized Correspondence Volumes into Your Neural Network' (NeurIPS 2020)

Official implementation of GOCor This is the official implementation of our paper : GOCor: Bringing Globally Optimized Correspondence Volumes into You

Prune Truong 71 Nov 18, 2022
This repository provides the official implementation of 'Learning to ignore: rethinking attention in CNNs' accepted in BMVC 2021.

inverse_attention This repository provides the official implementation of 'Learning to ignore: rethinking attention in CNNs' accepted in BMVC 2021. Le

Firas Laakom 5 Jul 08, 2022
wlad 2 Dec 19, 2022
TransCD: Scene Change Detection via Transformer-based Architecture

TransCD: Scene Change Detection via Transformer-based Architecture

wangzhixue 29 Dec 11, 2022
Towards Interpretable Deep Metric Learning with Structural Matching

DIML Created by Wenliang Zhao*, Yongming Rao*, Ziyi Wang, Jiwen Lu, Jie Zhou This repository contains PyTorch implementation for paper Towards Interpr

Wenliang Zhao 75 Nov 11, 2022
git《Pseudo-ISP: Learning Pseudo In-camera Signal Processing Pipeline from A Color Image Denoiser》(2021) GitHub: [fig5]

Pseudo-ISP: Learning Pseudo In-camera Signal Processing Pipeline from A Color Image Denoiser Abstract The success of deep denoisers on real-world colo

Yue Cao 51 Nov 22, 2022
Pytorch Implementation of paper "Noisy Natural Gradient as Variational Inference"

Noisy Natural Gradient as Variational Inference PyTorch implementation of Noisy Natural Gradient as Variational Inference. Requirements Python 3 Pytor

Tony JiHyun Kim 119 Dec 02, 2022
SafePicking: Learning Safe Object Extraction via Object-Level Mapping, ICRA 2022

SafePicking Learning Safe Object Extraction via Object-Level Mapping Kentaro Wad

Kentaro Wada 49 Oct 24, 2022
IEEE Winter Conference on Applications of Computer Vision 2022 Accepted

SSKT(Accepted WACV2022) Concept map Dataset Image dataset CIFAR10 (torchvision) CIFAR100 (torchvision) STL10 (torchvision) Pascal VOC (torchvision) Im

1 Nov 17, 2022
Code for Transformers Solve Limited Receptive Field for Monocular Depth Prediction

Official PyTorch code for Transformers Solve Limited Receptive Field for Monocular Depth Prediction. Guanglei Yang, Hao Tang, Mingli Ding, Nicu Sebe,

stanley 152 Dec 16, 2022
PyStan, a Python interface to Stan, a platform for statistical modeling. Documentation: https://pystan.readthedocs.io

PyStan NOTE: This documentation describes a BETA release of PyStan 3. PyStan is a Python interface to Stan, a package for Bayesian inference. Stan® is

Stan 229 Dec 29, 2022
Keras attention models including botnet,CoaT,CoAtNet,CMT,cotnet,halonet,resnest,resnext,resnetd,volo,mlp-mixer,resmlp,gmlp,levit

Keras_cv_attention_models Keras_cv_attention_models Usage Basic Usage Layers Model surgery AotNet ResNetD ResNeXt ResNetQ BotNet VOLO ResNeSt HaloNet

319 Dec 28, 2022
Temporal-Relational CrossTransformers

Temporal-Relational Cross-Transformers (TRX) This repo contains code for the method introduced in the paper: Temporal-Relational CrossTransformers for

83 Dec 12, 2022
A data-driven approach to quantify the value of classifiers in a machine learning ensemble.

Documentation | External Resources | Research Paper Shapley is a Python library for evaluating binary classifiers in a machine learning ensemble. The

Benedek Rozemberczki 188 Dec 29, 2022
Fast EMD for Python: a wrapper for Pele and Werman's C++ implementation of the Earth Mover's Distance metric

PyEMD: Fast EMD for Python PyEMD is a Python wrapper for Ofir Pele and Michael Werman's implementation of the Earth Mover's Distance that allows it to

William Mayner 433 Dec 31, 2022
Pytorch implementation of "Neural Wireframe Renderer: Learning Wireframe to Image Translations"

Neural Wireframe Renderer: Learning Wireframe to Image Translations Pytorch implementation of ideas from the paper Neural Wireframe Renderer: Learning

Yuan Xue 7 Nov 14, 2022
A method to perform unsupervised cross-region adaptation of crop classifiers trained with satellite image time series.

TimeMatch Official source code of TimeMatch: Unsupervised Cross-region Adaptation by Temporal Shift Estimation by Joachim Nyborg, Charlotte Pelletier,

Joachim Nyborg 17 Nov 01, 2022
[ICLR2021] Unlearnable Examples: Making Personal Data Unexploitable

Unlearnable Examples Code for ICLR2021 Spotlight Paper "Unlearnable Examples: Making Personal Data Unexploitable " by Hanxun Huang, Xingjun Ma, Sarah

Hanxun Huang 98 Dec 07, 2022
Official Implementation of Swapping Autoencoder for Deep Image Manipulation (NeurIPS 2020)

Swapping Autoencoder for Deep Image Manipulation Taesung Park, Jun-Yan Zhu, Oliver Wang, Jingwan Lu, Eli Shechtman, Alexei A. Efros, Richard Zhang UC

449 Dec 27, 2022