Code Monkey home page Code Monkey logo

pytorch_od's Introduction

Object Detection Modules for PyTorch

SoftmaxTree is a tree of softmax groups (i.e. the softmax axis is jagged) NMSFilter applies Non Maximal Suppression on a batch of confidence values and bouding boxes

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

pytorch_od's People

Contributors

dashesy avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar msftgits avatar vladserkoff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pytorch_od's Issues

Support installation without CUDA

Hi, @dashesy, thank you for the implementation of batched NMS. Unfortunately, I was not able to install the library on the machine without CUDA. AFAIS, there is a CPU implementation, and it would be nice to be able to use it on the CPU-only machines.
Thanks!
The trace when I try to install it on a machine without CUDA:

% pip install git+https://github.com/microsoft/pytorch_od.git
    ..........
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/1z/pz_kbcf15gncn6wg3ws9v9qm0000gn/T/pip-req-build-rzwrbl8z/setup.py", line 42, in <module>
        ], include_dirs=include_dirs),
      File "/usr/local/miniconda3/envs/env/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 476, in CUDAExtension
        library_dirs += library_paths(cuda=True)
      File "/usr/local/miniconda3/envs/env/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 555, in library_paths
        if (not os.path.exists(_join_cuda_home(lib_dir)) and
      File "/usr/local/miniconda3/envs/env/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1146, in _join_cuda_home
        raise EnvironmentError('CUDA_HOME environment variable is not set. '
    OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Build fails without CUDA runtime in pytorch 1.3

@dashesy, hello again!
Maybe somewhat related to #1, I'm not sure.
With pytorch 1.3 I am unable to build cuda extension without cuda runtime.
I'm building inside docker, pytorch/pytorch:1.3-cuda10.1-cudnn7-devel specifically, but the build fails with an error that nvidia driver could not be found. The full traceback is more than a thousand lines long, I provide the python traceback in the bottom.
When I run the container with --runtime=nvidia the build ends successfully.

Python traceback
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-req-build-1xpkr4i_/setup.py", line 89, in <module>
      'Topic :: Software Development',
    File "/opt/conda/lib/python3.6/site-packages/setuptools/__init__.py", line 145, in setup
      return distutils.core.setup(**attrs)
    File "/opt/conda/lib/python3.6/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/opt/conda/lib/python3.6/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/opt/conda/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/opt/conda/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 192, in run
      self.run_command('build')
    File "/opt/conda/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/opt/conda/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/opt/conda/lib/python3.6/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/opt/conda/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/opt/conda/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/opt/conda/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 84, in run
      _build_ext.run(self)
    File "/opt/conda/lib/python3.6/distutils/command/build_ext.py", line 339, in run
      self.build_extensions()
    File "/opt/conda/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 353, in build_extensions
      build_ext.build_extensions(self)
    File "/opt/conda/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
      self._build_extensions_serial()
    File "/opt/conda/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
      self.build_extension(ext)
    File "/opt/conda/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 205, in build_extension
      _build_ext.build_extension(self, ext)
    File "/opt/conda/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension
      depends=ext.depends)
    File "/opt/conda/lib/python3.6/distutils/ccompiler.py", line 574, in compile
      self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
    File "/opt/conda/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 269, in unix_wrap_compile
      "'-fPIC'"] + cflags + _get_cuda_arch_flags(cflags)
    File "/opt/conda/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 977, in _get_cuda_arch_flags
      capability = torch.cuda.get_device_capability()
    File "/opt/conda/lib/python3.6/site-packages/torch/cuda/__init__.py", line 328, in get_device_capability
      prop = get_device_properties(device)
    File "/opt/conda/lib/python3.6/site-packages/torch/cuda/__init__.py", line 334, in get_device_properties
      init()  # will define _get_device_properties and _CudaDeviceProperties
    File "/opt/conda/lib/python3.6/site-packages/torch/cuda/__init__.py", line 164, in init
      _lazy_init()
    File "/opt/conda/lib/python3.6/site-packages/torch/cuda/__init__.py", line 192, in _lazy_init
      _check_driver()
    File "/opt/conda/lib/python3.6/site-packages/torch/cuda/__init__.py", line 102, in _check_driver
      http://www.nvidia.com/Download/index.aspx""")
  AssertionError:
  Found no NVIDIA driver on your system. Please check that you
  have an NVIDIA GPU and installed a driver from
  http://www.nvidia.com/Download/index.aspx
  ----------------------------------------
  ERROR: Failed building wheel for mictorch
  Running setup.py clean for mictorch
Failed to build mictorch

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.