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
PyTorch code of "SLAPS: Self-Supervision Improves Structure Learning for Graph Neural Networks"

SLAPS-GNN This repo contains the implementation of the model proposed in SLAPS: Self-Supervision Improves Structure Learning for Graph Neural Networks

60 Dec 22, 2022
Non-Homogeneous Poisson Process Intensity Modeling and Estimation using Measure Transport

Non-Homogeneous Poisson Process Intensity Modeling and Estimation using Measure Transport This GitHub page provides code for reproducing the results i

Andrew Zammit Mangion 1 Nov 08, 2021
A custom DeepStack model for detecting 16 human actions.

DeepStack_ActionNET This repository provides a custom DeepStack model that has been trained and can be used for creating a new object detection API fo

MOSES OLAFENWA 16 Nov 11, 2022
Code for testing convergence rates of Lipschitz learning on graphs

📈 LipschitzLearningRates The code in this repository reproduces the experimental results on convergence rates for k-nearest neighbor graph infinity L

2 Dec 20, 2021
MVFNet: Multi-View Fusion Network for Efficient Video Recognition (AAAI 2021)

MVFNet: Multi-View Fusion Network for Efficient Video Recognition (AAAI 2021) Overview We release the code of the MVFNet (Multi-View Fusion Network).

2 Jan 29, 2022
Hepsiburada - Hepsiburada Urun Bilgisi Cekme

Hepsiburada Urun Bilgisi Cekme from hepsiburada import Marka nike = Marka("nike"

Ilker Manap 8 Oct 26, 2022
The repository contain code for building compiler using puthon.

Building Compiler This is a python implementation of JamieBuild's "Super Tiny Compiler" Overview JamieBuilds developed a wonderfully educative compile

Shyam Das Shrestha 1 Nov 21, 2021
[ICCV 2021] Official Tensorflow Implementation for "Single Image Defocus Deblurring Using Kernel-Sharing Parallel Atrous Convolutions"

KPAC: Kernel-Sharing Parallel Atrous Convolutional block This repository contains the official Tensorflow implementation of the following paper: Singl

Hyeongseok Son 50 Dec 29, 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
Weakly Supervised Text-to-SQL Parsing through Question Decomposition

Weakly Supervised Text-to-SQL Parsing through Question Decomposition The official repository for the paper "Weakly Supervised Text-to-SQL Parsing thro

14 Dec 19, 2022
Spearmint Bayesian optimization codebase

Spearmint Spearmint is a software package to perform Bayesian optimization. The Software is designed to automatically run experiments (thus the code n

Formerly: Harvard Intelligent Probabilistic Systems Group -- Now at Princeton 1.5k Dec 29, 2022
Few-shot Learning of GPT-3

Few-shot Learning With Language Models This is a codebase to perform few-shot "in-context" learning using language models similar to the GPT-3 paper.

Tony Z. Zhao 224 Dec 28, 2022
Efficient 6-DoF Grasp Generation in Cluttered Scenes

Contact-GraspNet Contact-GraspNet: Efficient 6-DoF Grasp Generation in Cluttered Scenes Martin Sundermeyer, Arsalan Mousavian, Rudolph Triebel, Dieter

NVIDIA Research Projects 148 Dec 28, 2022
这是一个unet-pytorch的源码,可以训练自己的模型

Unet:U-Net: Convolutional Networks for Biomedical Image Segmentation目标检测模型在Pytorch当中的实现 目录 性能情况 Performance 所需环境 Environment 注意事项 Attention 文件下载 Downl

Bubbliiiing 567 Jan 05, 2023
QKeras: a quantization deep learning library for Tensorflow Keras

QKeras github.com/google/qkeras QKeras 0.8 highlights: Automatic quantization using QKeras; Stochastic behavior (including stochastic rouding) is disa

Google 437 Jan 03, 2023
BYOL for Audio: Self-Supervised Learning for General-Purpose Audio Representation

BYOL for Audio: Self-Supervised Learning for General-Purpose Audio Representation This is a demo implementation of BYOL for Audio (BYOL-A), a self-sup

NTT Communication Science Laboratories 160 Jan 04, 2023
Yolov5-opencv-cpp-python - Example of using ultralytics YOLO V5 with OpenCV 4.5.4, C++ and Python

yolov5-opencv-cpp-python Example of performing inference with ultralytics YOLO V

183 Jan 09, 2023
Direct LiDAR Odometry: Fast Localization with Dense Point Clouds

Direct LiDAR Odometry: Fast Localization with Dense Point Clouds DLO is a lightweight and computationally-efficient frontend LiDAR odometry solution w

VECTR at UCLA 369 Dec 30, 2022
TAug :: Time Series Data Augmentation using Deep Generative Models

TAug :: Time Series Data Augmentation using Deep Generative Models Note!!! The package is under development so be careful for using in production! Fea

35 Dec 06, 2022
TensorFlow 101: Introduction to Deep Learning for Python Within TensorFlow

TensorFlow 101: Introduction to Deep Learning I have worked all my life in Machine Learning, and I've never seen one algorithm knock over its benchmar

Sefik Ilkin Serengil 896 Jan 04, 2023