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
Multi-modal co-attention for drug-target interaction annotation and Its Application to SARS-CoV-2

CoaDTI Multi-modal co-attention for drug-target interaction annotation and Its Application to SARS-CoV-2 Abstract Environment The test was conducted i

Layne_Huang 7 Nov 14, 2022
A PyTorch port of the Neural 3D Mesh Renderer

Neural 3D Mesh Renderer (CVPR 2018) This repo contains a PyTorch implementation of the paper Neural 3D Mesh Renderer by Hiroharu Kato, Yoshitaka Ushik

Daniilidis Group University of Pennsylvania 1k Jan 09, 2023
Fuzzy Overclustering (FOC)

Fuzzy Overclustering (FOC) In real-world datasets, we need consistent annotations between annotators to give a certain ground-truth label. However, in

2 Nov 08, 2022
CONetV2: Efficient Auto-Channel Size Optimization for CNNs

CONetV2: Efficient Auto-Channel Size Optimization for CNNs Exciting News! CONetV2: Efficient Auto-Channel Size Optimization for CNNs has been accepted

Mahdi S. Hosseini 3 Dec 13, 2021
Implémentation en pyhton de l'article Depixelizing pixel art de Johannes Kopf et Dani Lischinski

Implémentation en pyhton de l'article Depixelizing pixel art de Johannes Kopf et Dani Lischinski

TableauBits 3 May 29, 2022
A PaddlePaddle implementation of Time Interval Aware Self-Attentive Sequential Recommendation.

TiSASRec.paddle A PaddlePaddle implementation of Time Interval Aware Self-Attentive Sequential Recommendation. Introduction 论文:Time Interval Aware Sel

Paddorch 2 Nov 28, 2021
Tensorflow/Keras Plug-N-Play Deep Learning Models Compilation

DeepBay This project was created with the objective of compile Machine Learning Architectures created using Tensorflow or Keras. The architectures mus

Whitman Bohorquez 4 Sep 26, 2022
[NeurIPS 2020] Official repository for the project "Listening to Sound of Silence for Speech Denoising"

Listening to Sounds of Silence for Speech Denoising Introduction This is the repository of the "Listening to Sounds of Silence for Speech Denoising" p

Henry Xu 40 Dec 20, 2022
Official code for our CVPR '22 paper "Dataset Distillation by Matching Training Trajectories"

Dataset Distillation by Matching Training Trajectories Project Page | Paper This repo contains code for training expert trajectories and distilling sy

George Cazenavette 256 Jan 05, 2023
Multi-agent reinforcement learning algorithm and environment

Multi-agent reinforcement learning algorithm and environment [en/cn] Pytorch implements multi-agent reinforcement learning algorithms including IQL, Q

万鲲鹏 7 Sep 20, 2022
DeepStochlog Package For Python

DeepStochLog Installation Installing SWI Prolog DeepStochLog requires SWI Prolog to run. Run the following commands to install: sudo apt-add-repositor

KU Leuven Machine Learning Research Group 17 Dec 23, 2022
Invertible conditional GANs for image editing

Invertible Conditional GANs This is the implementation of the IcGAN model proposed in our paper: Invertible Conditional GANs for image editing. Novemb

Guim 278 Dec 12, 2022
Trajectory Extraction of road users via Traffic Camera

Traffic Monitoring Citation The associated paper for this project will be published here as soon as possible. When using this software, please cite th

Julian Strosahl 14 Dec 17, 2022
DeceFL: A Principled Decentralized Federated Learning Framework

DeceFL: A Principled Decentralized Federated Learning Framework This repository comprises codes that reproduce experiments in Ye, et al (2021), which

Huazhong Artificial Intelligence Lab (HAIL) 10 May 31, 2022
The source code for 'Noisy-Labeled NER with Confidence Estimation' accepted by NAACL 2021

Kun Liu*, Yao Fu*, Chuanqi Tan, Mosha Chen, Ningyu Zhang, Songfang Huang, Sheng Gao. Noisy-Labeled NER with Confidence Estimation. NAACL 2021. [arxiv]

30 Nov 12, 2022
Differentiable molecular simulation of proteins with a coarse-grained potential

Differentiable molecular simulation of proteins with a coarse-grained potential This repository contains the learned potential, simulation scripts and

UCL Bioinformatics Group 44 Dec 10, 2022
Pytorch implementation for A-NeRF: Articulated Neural Radiance Fields for Learning Human Shape, Appearance, and Pose

A-NeRF: Articulated Neural Radiance Fields for Learning Human Shape, Appearance, and Pose Paper | Website | Data A-NeRF: Articulated Neural Radiance F

Shih-Yang Su 172 Dec 22, 2022
Guided Internet-delivered Cognitive Behavioral Therapy Adherence Forecasting

Guided Internet-delivered Cognitive Behavioral Therapy Adherence Forecasting #Dataset The folder "Dataset" contains the dataset use in this work and m

0 Jan 08, 2022
A light and fast one class detection framework for edge devices. We provide face detector, head detector, pedestrian detector, vehicle detector......

A Light and Fast Face Detector for Edge Devices Big News: LFD, which is a big update of LFFD, now is released (2021.03.09). It is strongly recommended

YonghaoHe 1.3k Dec 25, 2022
Cobalt Strike teamserver detection.

Cobalt-Strike-det Cobalt Strike teamserver detection. usage: cobaltstrike_verify.py [-l TARGETS] [-t THREADS] optional arguments: -h, --help show this

TimWhite 17 Sep 27, 2022