Official PyTorch implementation of "Redistributing the Precision and Content in 3D-LUT-based Inverse Tone-mapping for HDR/WCG Display" in CVMP2023 (SIGGRAPH European Conference on Visual Media Production).
First of all thank you for your work on this project :)
Second of all, i keep having issues when trying to create the AILUT package.
I created a conda environment with all the prerequesites, i also installed GCC/G++ using this tutorial: https://dev.to/gamegods3/how-to-install-gcc-in-windows-10-the-easier-way-422j and i also have Visual studio 2019 installed on my computer.
However, when running the python ./ailut/setup.py install command my console looks like this:
(itmlut) C:\Projects\Python_projects\ITMLUT>python ./ailut/setup.py install
running install
C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` directly.
Instead, use pypa/build, pypa/installer or other
standards-based tools.
See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
********************************************************************************
!!
self.initialize_options()
C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\_distutils\cmd.py:66: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` and ``easy_install``.
Instead, use pypa/build, pypa/installer or other
standards-based tools.
See https://github.com/pypa/setuptools/issues/917 for details.
********************************************************************************
!!
self.initialize_options()
running bdist_egg
running egg_info
writing ailut.egg-info\PKG-INFO
writing dependency_links to ailut.egg-info\dependency_links.txt
writing top-level names to ailut.egg-info\top_level.txt
reading manifest file 'ailut.egg-info\SOURCES.txt'
writing manifest file 'ailut.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
**C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\torch\utils\cpp_extension.py:381: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified**
warnings.warn(f'Error checking compiler version for {compiler}: {error}')
building 'ailut._ext' extension
Emitting ninja build file C:\Projects\Python_projects\ITMLUT\ailut\build\temp.win-amd64-cpython-312\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 /O2 /W3 /GL /DNDEBUG /MD /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /wd4624 /wd4067 /wd4068 /EHsc -IC:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\torch\include -IC:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\torch\include\TH -IC:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\include" -IC:\Users\train7\anaconda3\envs\itmlut\include -IC:\Users\train7\anaconda3\envs\itmlut\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\cppwinrt" -c C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp /FoC:\Projects\Python_projects\ITMLUT\ailut\build\temp.win-amd64-cpython-312\Release\ailut\csrc\ailut_transform_cpu.obj -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 /std:c++17
FAILED: C:/Projects/Python_projects/ITMLUT/ailut/build/temp.win-amd64-cpython-312/Release/ailut/csrc/ailut_transform_cpu.obj
cl /showIncludes /nologo /O2 /W3 /GL /DNDEBUG /MD /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /wd4624 /wd4067 /wd4068 /EHsc -IC:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\torch\include -IC:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\torch\include\TH -IC:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\include" -IC:\Users\train7\anaconda3\envs\itmlut\include -IC:\Users\train7\anaconda3\envs\itmlut\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\cppwinrt" -c C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp /FoC:\Projects\Python_projects\ITMLUT\ailut\build\temp.win-amd64-cpython-312\Release\ailut\csrc\ailut_transform_cpu.obj -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 /std:c++17
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(41): error C2146: syntax error: missing ')' before identifier 'data_inp'
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(41): error C3646: 'data_inp': unknown override specifier
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(41): error C2988: unrecognizable template declaration/definition
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(41): error C2059: syntax error: ','
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(47): error C2059: syntax error: ')'
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(47): error C2143: syntax error: missing ';' before '{'
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(47): error C2447: '{': missing function header (old-style formal list?)
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(106): error C2146: syntax error: missing ')' before identifier 'grad_output'
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(106): error C3646: 'grad_output': unknown override specifier
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(106): error C2988: unrecognizable template declaration/definition
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(106): error C2059: syntax error: ','
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(114): error C2059: syntax error: ')'
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(114): error C2143: syntax error: missing ';' before '{'
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(114): error C2447: '{': missing function header (old-style formal list?)
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(236): error C2146: syntax error: missing ')' before identifier 'data_inp'
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(236): error C3646: 'data_inp': unknown override specifier
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(236): error C2988: unrecognizable template declaration/definition
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(236): error C2059: syntax error: ','
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(243): error C2059: syntax error: ')'
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(243): error C2143: syntax error: missing ';' before '{'
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(243): error C2447: '{': missing function header (old-style formal list?)
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(309): error C2146: syntax error: missing ')' before identifier 'grad_output'
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(309): error C3646: 'grad_output': unknown override specifier
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(309): error C2988: unrecognizable template declaration/definition
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(309): error C2059: syntax error: ','
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(319): error C2059: syntax error: ')'
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(319): error C2143: syntax error: missing ';' before '{'
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(319): error C2447: '{': missing function header (old-style formal list?)
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(483): error C3861: 'lut_transform_3d_cpu_forward_impl': identifier not found
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(513): error C3861: 'lut_transform_3d_cpu_backward_impl': identifier not found
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(547): error C3861: 'ailut_transform_3d_cpu_forward_impl': identifier not found
C:\Projects\Python_projects\ITMLUT\ailut\ailut\csrc\ailut_transform_cpu.cpp(579): error C3861: 'ailut_transform_3d_cpu_backward_impl': identifier not found
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\torch\utils\cpp_extension.py", line 2096, in _run_ninja_build
subprocess.run(
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
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 "C:\Projects\Python_projects\ITMLUT\ailut\setup.py", line 15, in <module>
setup(
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\__init__.py", line 103, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\dist.py", line 989, in run_command
super().run_command(command)
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\command\install.py", line 84, in run
self.do_egg_install()
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\command\install.py", line 132, in do_egg_install
self.run_command('bdist_egg')
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\dist.py", line 989, in run_command
super().run_command(command)
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\command\bdist_egg.py", line 167, in run
cmd = self.call_command('install_lib', warn_dir=0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\command\bdist_egg.py", line 153, in call_command
self.run_command(cmdname)
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\dist.py", line 989, in run_command
super().run_command(command)
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\command\install_lib.py", line 11, in run
self.build()
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\_distutils\command\install_lib.py", line 111, in build
self.run_command('build_ext')
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\dist.py", line 989, in run_command
super().run_command(command)
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\command\build_ext.py", line 88, in run
_build_ext.run(self)
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 345, in run
self.build_extensions()
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\torch\utils\cpp_extension.py", line 871, in build_extensions
build_ext.build_extensions(self)
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 467, in build_extensions
self._build_extensions_serial()
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 493, in _build_extensions_serial
self.build_extension(ext)
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\command\build_ext.py", line 249, in build_extension
_build_ext.build_extension(self, ext)
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 548, in build_extension
objects = self.compiler.compile(
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\torch\utils\cpp_extension.py", line 843, in win_wrap_ninja_compile
_write_ninja_file_and_compile_objects(
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\torch\utils\cpp_extension.py", line 1774, in _write_ninja_file_and_compile_objects
_run_ninja_build(
File "C:\Users\train7\anaconda3\envs\itmlut\Lib\site-packages\torch\utils\cpp_extension.py", line 2112, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
I also tried running the command in Developer Command for VS 2019 but i still couldn't get it to work.
Could you maybe help me solve this? Or can you create a more detailed guide on how the AILUT packet should be created?
Hello,
First of all thank you for your work on this project :)
Second of all, i keep having issues when trying to create the AILUT package. I created a conda environment with all the prerequesites, i also installed GCC/G++ using this tutorial: https://dev.to/gamegods3/how-to-install-gcc-in-windows-10-the-easier-way-422j and i also have Visual studio 2019 installed on my computer. However, when running the
python ./ailut/setup.py install
command my console looks like this:I also tried running the command in Developer Command for VS 2019 but i still couldn't get it to work.
Could you maybe help me solve this? Or can you create a more detailed guide on how the AILUT packet should be created?
Thank you in advance for your answer!