CRF-RNN for Semantic Image Segmentation - PyTorch version

Overview

CRF-RNN for Semantic Image Segmentation - PyTorch version

sample

Live demo:                           http://crfasrnn.torr.vision
Caffe version:                      http://github.com/torrvision/crfasrnn
Tensorflow/Keras version: http://github.com/sadeepj/crfasrnn_keras

This repository contains the official PyTorch implementation of the "CRF-RNN" semantic image segmentation method, published in the ICCV 2015 paper Conditional Random Fields as Recurrent Neural Networks. The online demo of this project won the Best Demo Prize at ICCV 2015. Results of this PyTorch code are identical to that of the Caffe and Tensorflow/Keras based versions above.

If you use this code/model for your research, please cite the following paper:

@inproceedings{crfasrnn_ICCV2015,
    author = {Shuai Zheng and Sadeep Jayasumana and Bernardino Romera-Paredes and Vibhav Vineet and
    Zhizhong Su and Dalong Du and Chang Huang and Philip H. S. Torr},
    title  = {Conditional Random Fields as Recurrent Neural Networks},
    booktitle = {International Conference on Computer Vision (ICCV)},
    year   = {2015}
}

Installation Guide

Note: If you are using a Python virtualenv, make sure it is activated before running each command in this guide.

Step 1: Clone the repository

$ git clone https://github.com/sadeepj/crfasrnn_pytorch.git

The root directory of the clone will be referred to as crfasrnn_pytorch hereafter.

Step 2: Install dependencies

Use the requirements.txt file in this repository to install all the dependencies via pip:

$ cd crfasrnn_pytorch
$ pip install -r requirements.txt

After installing the dependencies, run the following commands to make sure they are properly installed:

$ python
>>> import torch 

You should not see any errors while importing torch above.

Step 3: Build CRF-RNN custom op

Run setup.py inside the crfasrnn_pytorch/crfasrnn directory:

$ cd crfasrnn_pytorch/crfasrnn
$ python setup.py install 

Note that the python command in the console should refer to the Python interpreter associated with your PyTorch installation.

Step 4: Download the pre-trained model weights

Download the model weights from here and place it in the crfasrnn_pytorch directory with the file name crfasrnn_weights.pth.

Step 5: Run the demo

$ cd crfasrnn_pytorch
$ python run_demo.py

If all goes well, you will see the segmentation results in a file named "labels.png".

Contributors

Comments
  • Error compiling on windows 10

    Error compiling on windows 10

    Hello @sadeepj

    I am encountering a problem to compile the C++ code parts on windows 10. While it works fine on Linux, wether it be with the newest torch versions or older ones, I am unable to make it work on windows 10 and am encoutnering the following error at compilation

    running install
    running bdist_egg
    running egg_info
    writing permuto_cpp.egg-info\PKG-INFO
    writing dependency_links to permuto_cpp.egg-info\dependency_links.txt
    writing top-level names to permuto_cpp.egg-info\top_level.txt
    reading manifest file 'permuto_cpp.egg-info\SOURCES.txt'
    writing manifest file 'permuto_cpp.egg-info\SOURCES.txt'
    installing library code to build\bdist.win-amd64\egg
    running install_lib
    running build_ext
    C:\Users\group\anaconda3\envs\crfrnn\lib\site-packages\torch\utils\cpp_extension.py:274: UserWarning: Error checking compiler version for cl: 'utf-8' codec can't decode byte 0xa2 in position 24: invalid start byte
      warnings.warn('Error checking compiler version for {}: {}'.format(compiler, error))
    building 'permuto_cpp' extension
    Emitting ninja build file C:\Users\group\Downloads\test_compil\crfasrnn_pytorch\crfasrnn\build\temp.win-amd64-3.7\Release\build.ninja...
    Compiling objects...
    Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
    [1/1] cl /showIncludes /nologo /Ox /W3 /GL /DNDEBUG /MD /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc -IC:\Users\group\anaconda3\envs\crfrnn\lib\site-packages\torch\include -IC:\Users\group\anaconda3\envs\crfrnn\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\group\anaconda3\envs\crfrnn\lib\site-packages\torch\include\TH -IC:\Users\group\anaconda3\envs\crfrnn\lib\site-packages\torch\include\THC -IC:\Users\group\anaconda3\envs\crfrnn\include -IC:\Users\group\anaconda3\envs\crfrnn\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" -c C:\Users\group\Downloads\test_compil\crfasrnn_pytorch\crfasrnn\permutohedral.cpp /FoC:\Users\group\Downloads\test_compil\crfasrnn_pytorch\crfasrnn\build\temp.win-amd64-3.7\Release\permutohedral.obj -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=permuto_cpp -D_GLIBCXX_USE_CXX11_ABI=0 /std:c++14
    FAILED: C:/Users/group/Downloads/test_compil/crfasrnn_pytorch/crfasrnn/build/temp.win-amd64-3.7/Release/permutohedral.obj
    cl /showIncludes /nologo /Ox /W3 /GL /DNDEBUG /MD /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc -IC:\Users\group\anaconda3\envs\crfrnn\lib\site-packages\torch\include -IC:\Users\group\anaconda3\envs\crfrnn\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\group\anaconda3\envs\crfrnn\lib\site-packages\torch\include\TH -IC:\Users\group\anaconda3\envs\crfrnn\lib\site-packages\torch\include\THC -IC:\Users\group\anaconda3\envs\crfrnn\include -IC:\Users\group\anaconda3\envs\crfrnn\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" -c C:\Users\group\Downloads\test_compil\crfasrnn_pytorch\crfasrnn\permutohedral.cpp /FoC:\Users\group\Downloads\test_compil\crfasrnn_pytorch\crfasrnn\build\temp.win-amd64-3.7\Release\permutohedral.obj -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=permuto_cpp -D_GLIBCXX_USE_CXX11_ABI=0 /std:c++14
    Nota: inclusión del archivo: C:\Users\group\Downloads\test_compil\crfasrnn_pytorch\crfasrnn\permutohedral.h
    Nota: inclusión del archivo:  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cstdlib
    Nota: inclusión del archivo:   C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\yvals_core.h
    Nota: inclusión del archivo:    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vcruntime.h
    Nota: inclusión del archivo:     C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\sal.h
    Nota: inclusión del archivo:      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\concurrencysal.h
    Nota: inclusión del archivo:     C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vadefs.h
    Nota: inclusión del archivo:    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xkeycheck.h
    Nota: inclusión del archivo:   C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\math.h
    Nota: inclusión del archivo:    C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_math.h
    Nota: inclusión del archivo:     C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt.h
    Nota: inclusión del archivo:   C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\stdlib.h
    Nota: inclusión del archivo:    C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_malloc.h
    Nota: inclusión del archivo:    C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_search.h
    Nota: inclusión del archivo:     C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\stddef.h
    Nota: inclusión del archivo:    C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_wstdlib.h
    Nota: inclusión del archivo:    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\limits.h
    Nota: inclusión del archivo:  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vector
    Nota: inclusión del archivo:   C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xmemory
    Nota: inclusión del archivo:    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cstdint
    Nota: inclusión del archivo:     C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\stdint.h
    Nota: inclusión del archivo:    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\limits
    Nota: inclusión del archivo:     C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cfloat
    Nota: inclusión del archivo:      C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\float.h
    Nota: inclusión del archivo:     C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\climits
    Nota: inclusión del archivo:     C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cwchar
    Nota: inclusión del archivo:      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cstdio
    Nota: inclusión del archivo:       C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\stdio.h
    Nota: inclusión del archivo:        C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_wstdio.h
    Nota: inclusión del archivo:         C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_stdio_config.h
    Nota: inclusión del archivo:      C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\wchar.h
    Nota: inclusión del archivo:       C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_memcpy_s.h
    Nota: inclusión del archivo:        C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\errno.h
    Nota: inclusión del archivo:        C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vcruntime_string.h
    Nota: inclusión del archivo:       C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_wconio.h
    Nota: inclusión del archivo:       C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_wctype.h
    Nota: inclusión del archivo:       C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_wdirect.h
    Nota: inclusión del archivo:       C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_wio.h
    Nota: inclusión del archivo:        C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_share.h
    Nota: inclusión del archivo:       C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_wprocess.h
    Nota: inclusión del archivo:       C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_wstring.h
    Nota: inclusión del archivo:       C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_wtime.h
    Nota: inclusión del archivo:       C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\sys/stat.h
    Nota: inclusión del archivo:        C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\sys/types.h
    Nota: inclusión del archivo:     C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\intrin0.h
    Nota: inclusión del archivo:      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\intrin0.inl.h
    Nota: inclusión del archivo:     C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\isa_availability.h
    Nota: inclusión del archivo:     C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef
    Nota: inclusión del archivo:      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cstddef
    Nota: inclusión del archivo:       C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common
    Nota: inclusión del archivo:      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\initializer_list
    Nota: inclusión del archivo:    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\new
    Nota: inclusión del archivo:     C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\exception
    Nota: inclusión del archivo:      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\yvals.h
    Nota: inclusión del archivo:       C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\crtdbg.h
    Nota: inclusión del archivo:        C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vcruntime_new_debug.h
    Nota: inclusión del archivo:         C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vcruntime_new.h
    Nota: inclusión del archivo:       C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\crtdefs.h
    Nota: inclusión del archivo:       C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\use_ansi.h
    Nota: inclusión del archivo:      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits
    Nota: inclusión del archivo:      C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\malloc.h
    Nota: inclusión del archivo:      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vcruntime_exception.h
    Nota: inclusión del archivo:       C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\eh.h
    Nota: inclusión del archivo:        C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_terminate.hNota: inclusión del archivo:    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xatomic.h
    Nota: inclusión del archivo:    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xutility
    Nota: inclusión del archivo:     C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cstring
    Nota: inclusión del archivo:      C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\string.h
    Nota: inclusión del archivo:       C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_memory.h
    Nota: inclusión del archivo:     C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\utility
    Nota: inclusión del archivo:  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cassert
    Nota: inclusión del archivo:   C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\assert.h
    Nota: inclusión del archivo:  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath
    C:\Users\group\Downloads\test_compil\crfasrnn_pytorch\crfasrnn\permutohedral.cpp(327): error C2065: 'HashTableCopy': identificador no declarado
    C:\Users\group\Downloads\test_compil\crfasrnn_pytorch\crfasrnn\permutohedral.cpp(327): error C2146: error de sintaxis: falta ';' delante del identificador 'hash_table'
    C:\Users\group\Downloads\test_compil\crfasrnn_pytorch\crfasrnn\permutohedral.cpp(327): error C3861: 'hash_table': no se encontró el identificador
    C:\Users\group\Downloads\test_compil\crfasrnn_pytorch\crfasrnn\permutohedral.cpp(360): error C2065: 'assert': identificador no declarado
    C:\Users\group\Downloads\test_compil\crfasrnn_pytorch\crfasrnn\permutohedral.cpp(360): error C2143: error de sintaxis: falta ';' delante de 'constante'
    C:\Users\group\Downloads\test_compil\crfasrnn_pytorch\crfasrnn\permutohedral.cpp(360): error C2014: el comando de preprocesador debe empezar con un primer espacio que no esté en blanco
    C:\Users\group\Downloads\test_compil\crfasrnn_pytorch\crfasrnn\permutohedral.cpp(361): error C2065: 'feature': identificador no declarado
    C:\Users\group\Downloads\test_compil\crfasrnn_pytorch\crfasrnn\permutohedral.cpp(432): error C2065: 'hash_table': identificador no declarado
    C:\Users\group\Downloads\test_compil\crfasrnn_pytorch\crfasrnn\permutohedral.cpp(449): error C2065: 'hash_table': identificador no declarado
    C:\Users\group\Downloads\test_compil\crfasrnn_pytorch\crfasrnn\permutohedral.cpp(460): error C2065: 'hash_table': identificador no declarado
    C:\Users\group\Downloads\test_compil\crfasrnn_pytorch\crfasrnn\permutohedral.cpp(468): error C2065: 'hash_table': identificador no declarado
    C:\Users\group\Downloads\test_compil\crfasrnn_pytorch\crfasrnn\permutohedral.cpp(469): error C2065: 'hash_table': identificador no declarado
    ninja: build stopped: subcommand failed.
    Traceback (most recent call last):
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\site-packages\torch\utils\cpp_extension.py", line 1517, in _run_ninja_build
        subprocess.run(
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\subprocess.py", line 512, in run
        output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "setup.py", line 6, in <module>
        cmdclass={'build_ext': cpp_extension.BuildExtension})
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\site-packages\setuptools\__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\site-packages\setuptools\command\install.py", line 67, in run
        self.do_egg_install()
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\site-packages\setuptools\command\install.py", line 109, in do_egg_install
        self.run_command('bdist_egg')
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\site-packages\setuptools\command\bdist_egg.py", line 164, in run
        cmd = self.call_command('install_lib', warn_dir=0)
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\site-packages\setuptools\command\bdist_egg.py", line 150, in call_command
        self.run_command(cmdname)
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\site-packages\setuptools\command\install_lib.py", line 11, in run
        self.build()
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\distutils\command\install_lib.py", line 107, in build
        self.run_command('build_ext')
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\site-packages\setuptools\command\build_ext.py", line 79, in run
        _build_ext.run(self)
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\distutils\command\build_ext.py", line 340, in run
        self.build_extensions()
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\site-packages\torch\utils\cpp_extension.py", line 653, in build_extensions
        build_ext.build_extensions(self)
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\distutils\command\build_ext.py", line 449, in build_extensions
        self._build_extensions_serial()
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\distutils\command\build_ext.py", line 474, in _build_extensions_serial
        self.build_extension(ext)
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\site-packages\setuptools\command\build_ext.py", line 202, in build_extension
        _build_ext.build_extension(self, ext)
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\distutils\command\build_ext.py", line 534, in build_extension
        depends=ext.depends)
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\site-packages\torch\utils\cpp_extension.py", line 635, in win_wrap_ninja_compile
        with_cuda=with_cuda)
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\site-packages\torch\utils\cpp_extension.py", line 1238, in _write_ninja_file_and_compile_objects
        error_prefix='Error compiling objects for extension')
      File "C:\Users\group\anaconda3\envs\crfrnn\lib\site-packages\torch\utils\cpp_extension.py", line 1517, in _run_ninja_build
        subprocess.run(
    RuntimeError: Error compiling objects for extension
    

    I would be glad if you had some ideas to deal with this problem

    Thanks in advance

    opened by QuanticDisaster 2
  • Installation Problems

    Installation Problems

    When executing python setup.py install I get an error which says that a newer version of GCC is needed. The warning references to this issue. However the suggested approaches from the issue did not work for me. I am using conda and don't have sudo rights.

    Finally, I resolved the error by running: conda install -c anaconda gxx_linux-64 I hope this helps anyone who has the same problem.

    opened by RadekZenkl 3
  • FCN pretrained weights on COCO data

    FCN pretrained weights on COCO data

    I am looking for a pre-trained FCN model on COCO data. I noticed in your article that FCN is trained on COCO data. Could you provide weights? Thank you very much!

    opened by HWLMX 0
  • UNet version

    UNet version

    I'm testing to see the benefits of having the crf layer with a unet. Currently the model returns a loss that oscillates between 3&4 with the crf, while the unet (from the original paper) converges to a loss of .021. Any advice?

    opened by mavaylon1 2
  • Training on other backbone and datasets

    Training on other backbone and datasets

    Hello, I want to ask that if these pytorch crfasrnn model can be used for training? I want to train a model with other backbone instead of FCN. By the way, if I want to train on pascal_context dataset, after I change the label number to 59, and reinstall setup.py install, then it might should work smoothly? Thanks you !

    opened by pp00704831 4
Owner
Sadeep Jayasumana
Sadeep Jayasumana
[NeurIPS 2021]: Are Transformers More Robust Than CNNs? (Pytorch implementation & checkpoints)

Are Transformers More Robust Than CNNs? Pytorch implementation for NeurIPS 2021 Paper: Are Transformers More Robust Than CNNs? Our implementation is b

Yutong Bai 145 Dec 01, 2022
This repository provides the official code for GeNER (an automated dataset Generation framework for NER).

GeNER This repository provides the official code for GeNER (an automated dataset Generation framework for NER). Overview of GeNER GeNER allows you to

DMIS Laboratory - Korea University 50 Nov 30, 2022
This project deploys a yolo fastest model in the form of tflite on raspberry 3b+. The model is from another repository of mine called -Trash-Classification-Car

Deploy-yolo-fastest-tflite-on-raspberry 觉得有用的话可以顺手点个star嗷 这个项目将垃圾分类小车中的tflite模型移植到了树莓派3b+上面。 该项目主要是为了记录在树莓派部署yolo fastest tflite的流程 (之后有时间会尝试用C++部署来提升

7 Aug 16, 2022
The code for our NeurIPS 2021 paper "Kernelized Heterogeneous Risk Minimization".

Kernelized-HRM Jiashuo Liu, Zheyuan Hu The code for our NeurIPS 2021 paper "Kernelized Heterogeneous Risk Minimization"[1]. This repo contains the cod

Liu Jiashuo 8 Nov 20, 2022
Large scale and asynchronous Hyperparameter Optimization at your fingertip.

Syne Tune This package provides state-of-the-art distributed hyperparameter optimizers (HPO) where trials can be evaluated with several backend option

Amazon Web Services - Labs 236 Jan 01, 2023
Official code for "Stereo Waterdrop Removal with Row-wise Dilated Attention (IROS2021)"

Stereo-Waterdrop-Removal-with-Row-wise-Dilated-Attention This repository includes official codes for "Stereo Waterdrop Removal with Row-wise Dilated A

29 Oct 01, 2022
CV backbones including GhostNet, TinyNet and TNT, developed by Huawei Noah's Ark Lab.

CV Backbones including GhostNet, TinyNet, TNT (Transformer in Transformer) developed by Huawei Noah's Ark Lab. GhostNet Code TinyNet Code TNT Code Pyr

HUAWEI Noah's Ark Lab 3k Jan 08, 2023
The source code and data of the paper "Instance-wise Graph-based Framework for Multivariate Time Series Forecasting".

IGMTF The source code and data of the paper "Instance-wise Graph-based Framework for Multivariate Time Series Forecasting". Requirements The framework

Wentao Xu 24 Dec 05, 2022
MTA:SA Server Configer.

MTAConfiger MTA:SA Server Configer. Hi 👋 , I'm Alireza A Python Developer Boy 🔭 I’m currently working on my C# projects 🌱 I’m currently Learning CS

3 Jun 07, 2022
unofficial pytorch implement of "Squareplus: A Softplus-Like Algebraic Rectifier"

SquarePlus (Pytorch implement) unofficial pytorch implement of "Squareplus: A Softplus-Like Algebraic Rectifier" SquarePlus Squareplus is a Softplus-L

SeeFun 3 Dec 29, 2021
An experimentation and research platform to investigate the interaction of automated agents in an abstract simulated network environments.

CyberBattleSim April 8th, 2021: See the announcement on the Microsoft Security Blog. CyberBattleSim is an experimentation research platform to investi

Microsoft 1.5k Dec 25, 2022
10x faster matrix and vector operations

Bolt is an algorithm for compressing vectors of real-valued data and running mathematical operations directly on the compressed representations. If yo

2.3k Jan 09, 2023
Human segmentation models, training/inference code, and trained weights, implemented in PyTorch

Human-Segmentation-PyTorch Human segmentation models, training/inference code, and trained weights, implemented in PyTorch. Supported networks UNet: b

Thuy Ng 474 Dec 19, 2022
Pathdreamer: A World Model for Indoor Navigation

Pathdreamer: A World Model for Indoor Navigation This repository hosts the open source code for Pathdreamer, to be presented at ICCV 2021. Paper | Pro

Google Research 122 Jan 04, 2023
This codebase proposes modular light python and pytorch implementations of several LiDAR Odometry methods

pyLiDAR-SLAM This codebase proposes modular light python and pytorch implementations of several LiDAR Odometry methods, which can easily be evaluated

Kitware, Inc. 208 Dec 16, 2022
Hand Gesture Volume Control is AIML based project which uses image processing to control the volume of your Computer.

Hand Gesture Volume Control Modules There are basically three modules Handtracking Program Handtracking Module Volume Control Program Handtracking Pro

VITTAL 1 Jan 12, 2022
Code for 'Blockwise Sequential Model Learning for Partially Observable Reinforcement Learning' (AAAI 2022)

Blockwise Sequential Model Learning Code for 'Blockwise Sequential Model Learning for Partially Observable Reinforcement Learning' (AAAI 2022) For ins

2 Jun 17, 2022
Code for reproducible experiments presented in KSD Aggregated Goodness-of-fit Test.

Code for KSDAgg: a KSD aggregated goodness-of-fit test This GitHub repository contains the code for the reproducible experiments presented in our pape

Antonin Schrab 5 Dec 15, 2022
The source code of CVPR 2019 paper "Deep Exemplar-based Video Colorization".

Deep Exemplar-based Video Colorization (Pytorch Implementation) Paper | Pretrained Model | Youtube video 🔥 | Colab demo Deep Exemplar-based Video Col

Bo Zhang 253 Dec 27, 2022
Monk is a low code Deep Learning tool and a unified wrapper for Computer Vision.

Monk - A computer vision toolkit for everyone Why use Monk Issue: Want to begin learning computer vision Solution: Start with Monk's hands-on study ro

Tessellate Imaging 507 Dec 04, 2022