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
Original Pytorch Implementation of FLAME: Facial Landmark Heatmap Activated Multimodal Gaze Estimation

FLAME Original Pytorch Implementation of FLAME: Facial Landmark Heatmap Activated Multimodal Gaze Estimation, accepted at the 17th IEEE Internation Co

Neelabh Sinha 19 Dec 17, 2022
TRIQ implementation

TRIQ Implementation TF-Keras implementation of TRIQ as described in Transformer for Image Quality Assessment. Installation Clone this repository. Inst

Junyong You 115 Dec 30, 2022
Text Summarization - WCN — Weighted Contextual N-gram method for evaluation of Text Summarization

Text Summarization WCN — Weighted Contextual N-gram method for evaluation of Text Summarization In this project, I fine tune T5 model on Extreme Summa

Aditya Shah 1 Jan 03, 2022
A PyTorch Implementation of ViT (Vision Transformer)

ViT - Vision Transformer This is an implementation of ViT - Vision Transformer by Google Research Team through the paper "An Image is Worth 16x16 Word

Quan Nguyen 7 May 11, 2022
Vector.ai assignment

fabio-tests-nisargatman Low Level Approach: ###Tables: continents: id*, name, population, area, createdAt, updatedAt countries: id*, name, population,

Ravi Pullagurla 1 Nov 09, 2021
This repository contains the code used in the paper "Prompt-Based Multi-Modal Image Segmentation".

Prompt-Based Multi-Modal Image Segmentation This repository contains the code used in the paper "Prompt-Based Multi-Modal Image Segmentation". The sys

Timo Lüddecke 305 Dec 30, 2022
Code for our WACV 2022 paper "Hyper-Convolution Networks for Biomedical Image Segmentation"

Hyper-Convolution Networks for Biomedical Image Segmentation Code for our WACV 2022 paper "Hyper-Convolution Networks for Biomedical Image Segmentatio

Tianyu Ma 17 Nov 02, 2022
A comprehensive and up-to-date developer education platform for Urbit.

curriculum A comprehensive and up-to-date developer education platform for Urbit. This project organizes developer capabilities into a hierarchy of co

Sigilante 36 Oct 04, 2022
3D cascade RCNN for object detection on point cloud

3D Cascade RCNN This is the implementation of 3D Cascade RCNN: High Quality Object Detection in Point Clouds. We designed a 3D object detection model

Qi Cai 22 Dec 02, 2022
pytorch implementation of openpose including Hand and Body Pose Estimation.

pytorch-openpose pytorch implementation of openpose including Body and Hand Pose Estimation, and the pytorch model is directly converted from openpose

Hzzone 1.4k Jan 07, 2023
Wanli Li and Tieyun Qian: Exploit a Multi-head Reference Graph for Semi-supervised Relation Extraction, IJCNN 2021

MRefG Wanli Li and Tieyun Qian: "Exploit a Multi-head Reference Graph for Semi-supervised Relation Extraction", IJCNN 2021 1. Requirements To reproduc

万理 5 Jul 26, 2022
Rule Extraction Methods for Interactive eXplainability

REMIX: Rule Extraction Methods for Interactive eXplainability This repository contains a variety of tools and methods for extracting interpretable rul

Mateo Espinosa Zarlenga 21 Jan 03, 2023
BuildingNet: Learning to Label 3D Buildings

BuildingNet This is the implementation of the BuildingNet architecture described in this paper: Paper: BuildingNet: Learning to Label 3D Buildings Arx

16 Nov 07, 2022
QT Py Media Knob using rotary encoder & neopixel ring

QTPy-Knob QT Py USB Media Knob using rotary encoder & neopixel ring The QTPy-Knob features: Media knob for volume up/down/mute with "qtpy-knob.py" Cir

Tod E. Kurt 56 Dec 30, 2022
Hand-distance-measurement-game - Hand Distance Measurement Game

Hand Distance Measurement Game This is program is made to calculate the distance

Priyansh 2 Jan 12, 2022
Fang Zhonghao 13 Nov 19, 2022
Codes for "Template-free Prompt Tuning for Few-shot NER".

EntLM The source codes for EntLM. Dependencies: Cuda 10.1, python 3.6.5 To install the required packages by following commands: $ pip3 install -r requ

77 Dec 27, 2022
Ppq - A powerful offline neural network quantization tool with custimized IR

PPL Quantization Tool(PPL 量化工具) PPL Quantization Tool (PPQ) is a powerful offlin

605 Jan 03, 2023
A U-Net combined with a variational auto-encoder that is able to learn conditional distributions over semantic segmentations.

Probabilistic U-Net + **Update** + An improved Model (the Hierarchical Probabilistic U-Net) + LIDC crops is now available. See below. Re-implementatio

Simon Kohl 498 Dec 26, 2022
nanodet_plus,yolov5_v6.0

OAK_Detection OAK设备上适配nanodet_plus,yolov5_v6.0 Environment pytorch = 1.7.0

炼丹去了 1 Feb 18, 2022