mmcv | OpenMMLab Computer Vision Foundation | Computer Vision library

 by   open-mmlab Python Version: 2.2.0 License: Apache-2.0

kandi X-RAY | mmcv Summary

kandi X-RAY | mmcv Summary

mmcv is a Python library typically used in Artificial Intelligence, Computer Vision, Deep Learning, Pytorch applications. mmcv has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. You can install using 'pip install mmcv' or download it from GitHub, PyPI.

MMCV is a foundational library for computer vision research and supports many research projects as below:. It provides the following functionalities. See the documentation for more features and usage. Note: MMCV requires Python 3.6+.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              mmcv has a medium active ecosystem.
              It has 4986 star(s) with 1483 fork(s). There are 85 watchers for this library.
              There were 2 major release(s) in the last 12 months.
              There are 191 open issues and 817 have been closed. On average issues are closed in 16 days. There are 89 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of mmcv is 2.2.0

            kandi-Quality Quality

              mmcv has 0 bugs and 0 code smells.

            kandi-Security Security

              mmcv has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              mmcv code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              mmcv is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              mmcv releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              It has 34028 lines of code, 2008 functions and 331 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed mmcv and discovered the below as its top functions. This is intended to give you an instant insight into mmcv implemented functionality, and help decide if they suit your requirements.
            • Forward the convolution layer
            • Calculate the output size
            • Calculate output size
            • Fault convolution
            • Collect environment variables
            • Return the CUDA_HOME
            • Check if pytorch is a pytorch
            • Get build configuration
            • Crop the given bounding box
            • Register a module
            • Forward computation
            • Get a list of supported extensions
            • Convenience function for forward computation
            • Create a function for interpolation
            • Decorator for registering a backend
            • Forward convolutional layer
            • Forward k - points
            • Load object from file
            • Visualize bounding boxes
            • Plot learning rate curve
            • Resize image to multiple dimensions
            • Returns a list of files in the given directory or directory
            • Get a logger
            • Parse a requirements file
            • Display a list of bounding boxes
            • Create a progress bar for the given function
            Get all kandi verified functions for this library.

            mmcv Key Features

            No Key Features are available at this moment for mmcv.

            mmcv Examples and Code Snippets

            Tutorial 1: Learn about Configs-FAQ-Ignore some fields in the base configs
            Pythondot img1Lines of Code : 47dot img1License : Permissive (Apache-2.0)
            copy iconCopy
            model = dict(
                type='MaskRCNN',
                pretrained='torchvision://resnet50',
                backbone=dict(
                    type='ResNet',
                    depth=50,
                    num_stages=4,
                    out_indices=(0, 1, 2, 3),
                    frozen_stages=1,
                    norm_cfg=dict(type='BN',   
            copy iconCopy
            model = dict(
                type='MaskRCNN',
                pretrained='torchvision://resnet50',
                backbone=dict(
                    type='ResNet',
                    depth=50,
                    num_stages=4,
                    out_indices=(0, 1, 2, 3),
                    frozen_stages=1,
                    norm_cfg=dict(type='BN',   
            Using MMCV for the first time?
            Pythondot img3Lines of Code : 39dot img3License : Permissive (Apache-2.0)
            copy iconCopy
            # Create a conda virtual environment and activate it
            
            > conda create -n open-mmlab python=3.7 -y
            > conda activate open-mmlab
            
            # If you have CUDA 10.1 installed under /usr/local/cuda and would like to install PyTorch 1.5,you need to install the   
            gluon-cv - kinetics400
            Pythondot img4Lines of Code : 70dot img4License : Non-SPDX (Apache License 2.0)
            copy iconCopy
            """Prepare the Kinetics400 dataset
            ==================================
            
            `Kinetics400 `_  is an action recognition dataset
            of realistic action videos, collected from YouTube. With 306,245 short trimmed videos
            from 400 action categories, it is one of th  
            gluon-cv - hmdb51
            Pythondot img5Lines of Code : 47dot img5License : Non-SPDX (Apache License 2.0)
            copy iconCopy
            """Prepare the HMDB51 Dataset
            =============================
            
            `HMDB51 `_  is an action recognition dataset,
            collected from various sources, mostly from movies, and a small proportion from public databases such as the Prelinger archive,
            YouTube and Goo  
            gluon-cv - ucf101
            Pythondot img6Lines of Code : 47dot img6License : Non-SPDX (Apache License 2.0)
            copy iconCopy
            """Prepare the UCF101 dataset
            =============================
            
            `UCF101 `_  is an action recognition dataset
            of realistic action videos, collected from YouTube. With 13,320 short trimmed videos
            from 101 action categories, it is one of the most widely us  

            Community Discussions

            QUESTION

            Error during traning my model with pytorch, stack expects each tensor to be equal size
            Asked 2022-Apr-05 at 08:16

            I am using MMSegmentainon library to train my model for instance image segmentation, during the traingin, I craete the model(Vision Transformer) and when I try to fit the model using this:

            I get this error:

            RuntimeError:CaughtRuntimeErrorinDataLoaderworkerprocess0.OriginalTraceback(mostrecentcalllast): File"/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/worker.py",line287,in _worker_loop data=fetcher.fetch(index) File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 47, infetch returnself.collate_fn(data) File "/usr/local/lib/python3.7/dist-packages/mmcv/parallel/collate.py", line 81, in collateforkeyinbatch[0] File"/usr/local/lib/python3.7/dist-packages/mmcv/parallel/collate.py",line81,in forkey in batch[0] File"/usr/local/lib/python3.7/dist-packages/mmcv/parallel/collate.py",line59,incollatestacked.append(default_collate(padded_samples)) File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/collate.py", line 56, indefault_collate returntorch.stack(batch,0,out=out)

            RuntimeError: stack expects each tensor to be equal size, but got [1, 256, 256, 256] at entry0 and[1,256,256] at entry3

            ** I must also mention that I have tested my own dataset with other models available in their library but all of them works properly.

            tried :

            ...

            ANSWER

            Answered 2022-Apr-05 at 08:16

            It seems that images in your dataset might not have the same size, as in the VIT model https://arxiv.org/abs/2010.11929, you are using an MLP model,

            if it was not the case, it is worth checking if your labels are all in the expected dimension. presumably, MMsegmentattion expects the output to be just the annotation map (a 2D array). It is recommended that you revise your dataset and prepare the annotation map.

            Source https://stackoverflow.com/questions/71742524

            QUESTION

            cannot install mmcv with cuda 11
            Asked 2021-Apr-16 at 14:19

            i tried to imstall mmcv for cuda 11 by using this command

            ...

            ANSWER

            Answered 2021-Apr-16 at 14:19

            Remove the spaces around ==:

            Source https://stackoverflow.com/questions/67126760

            QUESTION

            I cannot use opencv2 and received ImportError: libgl.so.1 cannot open shared object file no such file or directory
            Asked 2020-Nov-04 at 03:33

            **env:**ubuntu16.04 anaconda3 python3.7.8 cuda10.0 gcc5.5

            command:

            ...

            ANSWER

            Answered 2020-Nov-04 at 03:33

            I have solved this problem! Firstly,find the file:

            Source https://stackoverflow.com/questions/64664094

            QUESTION

            fatal error: cuda_runtime_api.h: No such file or directory when trying to use cuda in docker
            Asked 2020-Oct-22 at 14:06

            I am trying to build a docker image for a python script that I would like to deploy. This is the first time I am using docker so I'm probably doing something wrong but I have no clue what.

            My System:

            ...

            ANSWER

            Answered 2020-Oct-22 at 13:20

            EDIT: this answer just tells you how to verify what's happening in your docker image. Unfortunately I'm unable to figure out why it is happening.

            How to check it?

            At each step of the docker build, you can see the various layers being generated. You can use that ID to create a temporary image to check what's happening. e.g.

            Source https://stackoverflow.com/questions/64481487

            QUESTION

            Python ImportError: cannot import name '__version__'
            Asked 2020-Apr-27 at 12:29

            Below code is part of my code

            ...

            ANSWER

            Answered 2020-Apr-27 at 12:29

            The problem was due to version issues as discussed in this Github issue

            Can you try the following?

            pip install Pillow==6.1

            Also, removing and reinstalling Pillow might help.

            Source https://stackoverflow.com/questions/61458810

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install mmcv

            There are two versions of MMCV:. Note: Do not install both versions in the same environment, otherwise you may encounter errors like ModuleNotFound. You need to uninstall one before installing the other. Installing the full version is highly recommended if CUDA is available. a. Install the full version. Before installing mmcv-full, make sure that PyTorch has been successfully installed following the official guide. We provide pre-built mmcv packages (recommended) with different PyTorch and CUDA versions to simplify the building. In addition, you can run check_installation.py to check the installation of mmcv-full after running the installation commands. i. Install the latest version.
            mmcv-full: comprehensive, with full features and various CUDA ops out of box. It takes longer time to build.
            mmcv: lite, without CUDA ops but all other features, similar to mmcv<1.0.0. It is useful when you do not need those CUDA ops.
            Check here for detailed instruction.

            Support

            We appreciate all contributions to improve MMCV. Please refer to CONTRIBUTING.md for the contributing guideline.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install mmcv

          • CLONE
          • HTTPS

            https://github.com/open-mmlab/mmcv.git

          • CLI

            gh repo clone open-mmlab/mmcv

          • sshUrl

            git@github.com:open-mmlab/mmcv.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link