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
Learning Pixel-level Semantic Affinity with Image-level Supervision for Weakly Supervised Semantic Segmentation, CVPR 2018

Learning Pixel-level Semantic Affinity with Image-level Supervision This code is deprecated. Please see https://github.com/jiwoon-ahn/irn instead. Int

Jiwoon Ahn 337 Dec 15, 2022
Pytorch implementation of the popular Improv RNN model originally proposed by the Magenta team.

Pytorch Implementation of Improv RNN Overview This code is a pytorch implementation of the popular Improv RNN model originally implemented by the Mage

Sebastian Murgul 3 Nov 11, 2022
Segmentation in Style: Unsupervised Semantic Image Segmentation with Stylegan and CLIP

Segmentation in Style: Unsupervised Semantic Image Segmentation with Stylegan and CLIP Abstract: We introduce a method that allows to automatically se

Daniil Pakhomov 134 Dec 19, 2022
TorchDistiller - a collection of the open source pytorch code for knowledge distillation, especially for the perception tasks, including semantic segmentation, depth estimation, object detection and instance segmentation.

This project is a collection of the open source pytorch code for knowledge distillation, especially for the perception tasks, including semantic segmentation, depth estimation, object detection and instance segmentation.

yifan liu 147 Dec 3, 2022
A PaddlePaddle version of Neural Renderer, refer to its PyTorch version

Neural 3D Mesh Renderer in PadddlePaddle A PaddlePaddle version of Neural Renderer, refer to its PyTorch version Install Run: pip install neural-rende

AgentMaker 13 Jul 12, 2022
📝 Wrapper library for text generation / language models at char and word level with RNN in TensorFlow

tensorlm Generate Shakespeare poems with 4 lines of code. Installation tensorlm is written in / for Python 3.4+ and TensorFlow 1.1+ pip3 install tenso

Kilian Batzner 63 May 22, 2021
Algorithmic Trading using RNN

Deep-Trading This an implementation adapted from Rachnog Neural networks for algorithmic trading. Part One — Simple time series forecasting and this c

Hazem Nomer 29 Sep 4, 2022
LSTMs (Long Short Term Memory) RNN for prediction of price trends

Price Prediction with Recurrent Neural Networks LSTMs BTC-USD price prediction with deep learning algorithm. Artificial Neural Networks specifically L

null 5 Nov 12, 2021
Implements Stacked-RNN in numpy and torch with manual forward and backward functions

Recurrent Neural Networks Implements simple recurrent network and a stacked recurrent network in numpy and torch respectively. Both flavours implement

Vishal R 1 Nov 16, 2021
keyframes-CNN-RNN(action recognition)

keyframes-CNN-RNN(action recognition) Environment: python>=3.7 pytorch>=1.2 Datasets: Following the format of UCF101 action recognition. Run steps: Mo

null 4 Feb 9, 2022
Using a Seq2Seq RNN architecture via TensorFlow to predict future Bitcoin prices

Recurrent Bitcoin Network A Data Science Thesis Project About This repository contains the source code for implementing Bitcoin price prediciton using

Frizu 6 Sep 8, 2022
RNN Predict Street Commercial Vitality

RNN-for-Predicting-Street-Vitality Code and dataset for Predicting the Vitality of Stores along the Street based on Business Type Sequence via Recurre

Zidong LIU 1 Dec 15, 2021
Emotion classification of online comments based on RNN

emotion_classification Emotion classification of online comments based on RNN, the accuracy of the model in the test set reaches 99% data: Large Movie

null 1 Nov 23, 2021
Static Features Classifier - A static features classifier for Point-Could clusters using an Attention-RNN model

Static Features Classifier This is a static features classifier for Point-Could

ABDALKARIM MOHTASIB 1 Jan 25, 2022
Mae segmentation - Reproduction of semantic segmentation using masked autoencoder (mae)

ADE20k Semantic segmentation with MAE Getting started Install the mmsegmentation

null 97 Dec 17, 2022
Exploring Cross-Image Pixel Contrast for Semantic Segmentation

Exploring Cross-Image Pixel Contrast for Semantic Segmentation Exploring Cross-Image Pixel Contrast for Semantic Segmentation, Wenguan Wang, Tianfei Z

Tianfei Zhou 510 Jan 2, 2023
A Comprehensive Analysis of Weakly-Supervised Semantic Segmentation in Different Image Domains (IJCV submission)

wsss-analysis The code of: A Comprehensive Analysis of Weakly-Supervised Semantic Segmentation in Different Image Domains, arXiv pre-print 2019 paper.

Lyndon Chan 48 Dec 18, 2022