GithubHelp home page GithubHelp logo

caiyuanhao1998 / sax-nerf Goto Github PK

View Code? Open in Web Editor NEW
316.0 15.0 14.0 14.31 MB

"Structure-Aware Sparse-View X-ray 3D Reconstruction" (CVPR 2024)

Home Page: https://arxiv.org/abs/2311.10959

License: MIT License

Python 95.26% C++ 0.07% Cuda 4.44% C 0.23%
3d-graphics 3d-reconstruction ct-reconstruction medical-imaging nerf x-ray-images neural-radiance-fields transformer cvpr 3d-vision

sax-nerf's People

Contributors

caiyuanhao1998 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sax-nerf's Issues

About generating private datasets

Hello! The img.mat file was missing when running generatedata_backpack.py. Could you upload this data, please? FileNotFoundError: [Errno 2] No such file or directory: './dataGenerator/raw_data/backpack/img.mat' In addition, if I want to use a nii.gz format CT file to generate a training set, what should I do? I found in the generatedata.py code that the input CT needs a dictionary, which contains a lot of information.

SAX-NeRF in colab

Hello,

Apparently, SAX-NeRF code requires cuda 11.3, which seems suprising as it looks to be built on naf hash encoder that I could run on cuda 12.2. In colab, the default version is 12.2, and it is not convenient to modify that. Do you know if there is any solution to run your code in colab?

Here is what I obtain when running the code:
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda'
/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py:1967: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation.
If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST'].
warnings.warn(
Traceback (most recent call last):
File "/content/drive/MyDrive/SAX-NeRF/train_mlg.py", line 23, in
from src.trainer_mlg import Trainer
File "/content/drive/MyDrive/SAX-NeRF/src/trainer_mlg.py", line 17, in
from .encoder import get_encoder
File "/content/drive/MyDrive/SAX-NeRF/src/encoder/init.py", line 1, in
from .hashencoder import HashEncoder
File "/content/drive/MyDrive/SAX-NeRF/src/encoder/hashencoder/init.py", line 1, in
from .hashgrid import HashEncoder
File "/content/drive/MyDrive/SAX-NeRF/src/encoder/hashencoder/hashgrid.py", line 8, in
from .backend import _backend
File "/content/drive/MyDrive/SAX-NeRF/src/encoder/hashencoder/backend.py", line 6, in
_backend = load(name='_hash_encoder',
File "/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py", line 1309, in load
return _jit_compile(
File "/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py", line 1719, in _jit_compile
_write_ninja_file_and_build_library(
File "/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py", line 1819, in _write_ninja_file_and_build_library
_write_ninja_file_to_build_library(
File "/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py", line 2206, in _write_ninja_file_to_build_library
cuda_flags = common_cflags + COMMON_NVCC_FLAGS + _get_cuda_arch_flags()
File "/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py", line 1987, in _get_cuda_arch_flags
arch_list[-1] += '+PTX'
IndexError: list index out of range

Thank you for your time.
Quentin

Question regarding the X3D dataset.

I appreciate the excellence of your research.
Upon reading the paper, I was wondering when I could download the X3D dataset used in the paper.
Or could you provide information on where the dataset can be downloaded?

Thank you for good research.

About hardware requirements (GPU)

Thanks for sharing your wonderful project !!
I was really looking forward to reading the scripts.

I would like to ask about the hardware requirements for training a model.
In your paper, you mentioned that all experiments were performed on RTX8000 (VRAM: 48GB).
How much VRAM does it take, for example, python train_mlg.py --config config/Lineformer/chest_50.yaml ?
With V100 (VRAM: 16GB), I got an OOM error.

I would appreciate it if you could let me know.
Thank you in advance.

Code release

Great work! Are there any plans to release the code?

Raw data convert

Dear author,
If my raw data are in nii format, how could I convert them to the suitable form for SAX-NeRF, or what parameters should I stay the same?

About your strategies

A great work on CT reconstruction.
I wanna ask a question. The strategies you developed in your paper: lineformer and MLG, are they suitable for natural scenes, i.e. RGB NeRF? It seems that they are not specific for X-rays.

SAX-NeRF testing error

python : 3.9
cuda : 11.3
pytorch : 1.10
torch.cuda.is_available() : true

I an trying to run testing about part of sax-nerf which does not work, could you have a look please? thanks

Traceback (most recent call last):
  File "C:\3dgs\SAX-NeRF\test.py", line 29, in <module>
    from src.encoder import get_encoder
  File "C:\3dgs\SAX-NeRF\src\encoder\__init__.py", line 1, in <module>
    from .hashencoder import HashEncoder
  File "C:\3dgs\SAX-NeRF\src\encoder\hashencoder\__init__.py", line 1, in <module>
    from .hashgrid import HashEncoder
  File "C:\3dgs\SAX-NeRF\src\encoder\hashencoder\hashgrid.py", line 8, in <module>
    from .backend import _backend
  File "C:\3dgs\SAX-NeRF\src\encoder\hashencoder\backend.py", line 6, in <module>
    _backend = load(name='_hash_encoder',
  File "C:\Anaconda\envs\test\lib\site-packages\torch\utils\cpp_extension.py", line 1144, in load
    return _jit_compile(
  File "C:\Anaconda\envs\test\lib\site-packages\torch\utils\cpp_extension.py", line 1357, in _jit_compile
    _write_ninja_file_and_build_library(
  File "C:\Anaconda\envs\test\lib\site-packages\torch\utils\cpp_extension.py", line 1456, in _write_ninja_file_and_build_library
    _write_ninja_file_to_build_library(
  File "C:\Anaconda\envs\test\lib\site-packages\torch\utils\cpp_extension.py", line 1857, in _write_ninja_file_to_build_library
    cuda_flags = common_cflags + COMMON_NVCC_FLAGS + _get_cuda_arch_flags()
  File "C:\Anaconda\envs\test\lib\site-packages\torch\utils\cpp_extension.py", line 1626, in _get_cuda_arch_flags
    arch_list[-1] += '+PTX'
IndexError: list index out of range```

Error with generating own data using TIGRE

Hi, thanks for sharing this awesome project!

I have already generated .mat file.
However, when I try to run 'python dataGenerator/generateData_backpack.py', I got the following errors as shown below. I followed the steps for downloading and installing TIGRE exactly without any errors during those steps. Is there any effective way to solve this problem? Thanks a lot!

image

Testing FDK error No TIGREDataset_Traditional function

Thanks for sharing your awesome project!
I try to run python3 eval_traditional.py --algorithm fdk --category chest --config config/FDK/chest_50.yaml .
But retrun some error
Traceback (most recent call last): File "/workspace/SAX-NeRF/eval_traditional.py", line 9, in <module> from src.evaluator import Evaluator File "/workspace/SAX-NeRF/src/evaluator.py", line 5, in <module> from .dataset import TIGREDataset_Traditional as Dataset ImportError: cannot import name 'TIGREDataset_Traditional' from 'src.dataset' (/workspace/SAX-NeRF/src/dataset/__init__.py)
It seems like there is no function called TIGREDataset_Traditional。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.