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
Safe Local Motion Planning with Self-Supervised Freespace Forecasting, CVPR 2021

Safe Local Motion Planning with Self-Supervised Freespace Forecasting By Peiyun Hu, Aaron Huang, John Dolan, David Held, and Deva Ramanan Citing us Yo

Peiyun Hu 90 Dec 01, 2022
Generic template to bootstrap your PyTorch project with PyTorch Lightning, Hydra, W&B, and DVC.

NN Template Generic template to bootstrap your PyTorch project. Click on Use this Template and avoid writing boilerplate code for: PyTorch Lightning,

Luca Moschella 520 Dec 30, 2022
A Simple LSTM-Based Solution for "Heartbeat Signal Classification and Prediction" in Tianchi

LSTM-Time-Series-Prediction A Simple LSTM-Based Solution for "Heartbeat Signal Classification and Prediction" in Tianchi Contest. The Link of the Cont

KevinCHEN 1 Jun 13, 2022
Official PyTorch implementation of the paper Image-Based CLIP-Guided Essence Transfer.

TargetCLIP- official pytorch implementation of the paper Image-Based CLIP-Guided Essence Transfer This repository finds a global direction in StyleGAN

Hila Chefer 221 Dec 13, 2022
PyTorch implementation of "Image-to-Image Translation Using Conditional Adversarial Networks".

pix2pix-pytorch PyTorch implementation of Image-to-Image Translation Using Conditional Adversarial Networks. Based on pix2pix by Phillip Isola et al.

mrzhu 383 Dec 17, 2022
Potato Disease Classification - Training, Rest APIs, and Frontend to test.

Potato Disease Classification Setup for Python: Install Python (Setup instructions) Install Python packages pip3 install -r training/requirements.txt

codebasics 95 Dec 21, 2022
Tool cek opsi checkpoint facebook!

tool apa ini? cek_opsi_facebook adalah sebuah tool yang mengecek opsi checkpoint akun facebook yang terkena checkpoint! tujuan dibuatnya tool ini? too

Muhammad Latif Harkat 2 Jul 17, 2022
Deploy tensorflow graphs for fast evaluation and export to tensorflow-less environments running numpy.

Deploy tensorflow graphs for fast evaluation and export to tensorflow-less environments running numpy. Now with tensorflow 1.0 support. Evaluation usa

Marcel R. 349 Aug 06, 2022
SuRE Evaluation: A Supplementary Material

SuRE Evaluation: A Supplementary Material This repository contains supplementary material regarding the evaluations presented in the paper Visual Expl

NYU Visualization Lab 0 Dec 14, 2021
Stochastic Scene-Aware Motion Prediction

Stochastic Scene-Aware Motion Prediction [Project Page] [Paper] Description This repository contains the training code for MotionNet and GoalNet of SA

Mohamed Hassan 31 Dec 09, 2022
Prompts - Read a textfile of prompts and import into anki via ankiconnect

prompts read a textfile of prompts and import into anki via ankiconnect Usage In

Alexander Cobleigh 2 Jul 28, 2022
This is the codebase for Diffusion Models Beat GANS on Image Synthesis.

This is the codebase for Diffusion Models Beat GANS on Image Synthesis.

OpenAI 3k Dec 26, 2022
Adaptation through prediction: multisensory active inference torque control

Adaptation through prediction: multisensory active inference torque control Submitted to IEEE Transactions on Cognitive and Developmental Systems Abst

Cristian Meo 1 Nov 07, 2022
Training Very Deep Neural Networks Without Skip-Connections

DiracNets v2 update (January 2018): The code was updated for DiracNets-v2 in which we removed NCReLU by adding per-channel a and b multipliers without

Sergey Zagoruyko 585 Oct 12, 2022
KAPAO is an efficient multi-person human pose estimation model that detects keypoints and poses as objects and fuses the detections to predict human poses.

KAPAO (Keypoints and Poses as Objects) KAPAO is an efficient single-stage multi-person human pose estimation model that models keypoints and poses as

Will McNally 664 Dec 30, 2022
The world's simplest facial recognition api for Python and the command line

Face Recognition You can also read a translated version of this file in Chinese 简体中文版 or in Korean 한국어 or in Japanese 日本語. Recognize and manipulate fa

Adam Geitgey 46.9k Jan 03, 2023
A mini library for Policy Gradients with Parameter-based Exploration, with reference implementation of the ClipUp optimizer from NNAISENSE.

PGPElib A mini library for Policy Gradients with Parameter-based Exploration [1] and friends. This library serves as a clean re-implementation of the

NNAISENSE 56 Jan 01, 2023
Gradient representations in ReLU networks as similarity functions

Gradient representations in ReLU networks as similarity functions by Dániel Rácz and Bálint Daróczy. This repo contains the python code related to our

1 Oct 08, 2021
Share a benchmark that can easily apply reinforcement learning in Job-shop-scheduling

Gymjsp Gymjsp is an open source Python library, which uses the OpenAI Gym interface for easily instantiating and interacting with RL environments, and

134 Dec 08, 2022
Official PyTorch Implementation of Hypercorrelation Squeeze for Few-Shot Segmentation, arXiv 2021

Hypercorrelation Squeeze for Few-Shot Segmentation This is the implementation of the paper "Hypercorrelation Squeeze for Few-Shot Segmentation" by Juh

Juhong Min 165 Dec 28, 2022