Coder Social home page Coder Social logo

astra-vision / scenerf Goto Github PK

View Code? Open in Web Editor NEW
332.0 7.0 30.0 225.26 MB

[ICCV 2023] Official implementation of "SceneRF: Self-Supervised Monocular 3D Scene Reconstruction with Radiance Fields"

Home Page: https://astra-vision.github.io/SceneRF/

License: Apache License 2.0

Python 99.21% Dockerfile 0.79%
deep-learning nerf neural-radiance-fields pytorch pytorch-lightning scene-reconstruction single-image-reconstruction depth-estimation self-supervised-learning 3d-reconstruction

scenerf's People

Contributors

anhquancao avatar florianpfleiderer 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

scenerf's Issues

Asking for preprocess tsdf of 13.84 IoU ckpt

Hi there again, first of all thank you for replying to my earlier questions. I want to ask can you release the preprocessed tsdf with the 13.84 result IoU? Right now i'm trying to reproduce your scene reconstruction results but since my computation budget is small, I can only generating depth at angle=0 and step=5. But the results seems to be not as good as the paper. It would be very nice to have a preprocessed tsdf to validate the paper's results :D
image

Something wrong when I want to compute the depth metrics on all frames in each sequence

Hi, today when I want to compute the depth metrics on all frames in each sequence follow your instructions, I met an error.
b38c56d79e311aa1cad611a26fb404a
May I ask that did you met this problem before?
I print the variable, it looks like
fd2271f2e63dac2d352d42679e9ab7b
I tried some methods like using "torch.unsqueeze()" to expand dimensions but it doesn't work. I have no idea on how to fix it now. :(
Sorry to bother you.

Error with training on single gpu.

When I set the parameter '--n_gpus' to 1, error occurs as follow.
File "/home/sober/SceneRF-main/scenerf/models/unet2d_sphere.py", line 247, in forward
encoded_feats = self.encoder(x)
File "/home/sober/anaconda3/envs/scenerf/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/sober/SceneRF-main/scenerf/models/unet2d_sphere.py", line 217, in forward
for k, v in self.original_model._modules.items():
AttributeError: 'collections.OrderedDict' object has no attribute '_modules'

Some question about compute_transformation and dataset

Hi author, thanks for your excellent work first! I have been trying to reimplement your work on SCARED dataset recently. I have some questions about the compute_transformation function.

  1. I understand it's to calculate the transformation matrix from the source frame to infer frame and source frame to target frame. But I thought it would be enough till this line, why still need to register the 3d to 3d points and make another transformation?

  2. I don't know if you are familiar with SCARED dataset. It does not have a velo. Its depth map is directly presented in size of (H, W,3), where each pixel contains an (X, Y,Z) coordinate which is the vertex position in left camera space that the pixel projects to. So if I use compute_transformation, can I just assume T_velo_2_cam2 and T_cam0_2_cam2 to be identity matrix(e.g. eye(4))? And points variables like pts_velo_source to be the depth map reshape to size(H * W, 3)?

  3. Do you have a suggestion on how to determine the scene_size and vox_origin?

Thanks for your time and really look forward to your reply!

About dataset

Your work is excellent.!What is the directory structure for storing the datasets in this project?

About cam_pts_to_angle

https://github.com/astra-vision/SceneRF/blob/f55d944f7df49213332467e81e3b245301a40870/scenerf/models/spherical_mapping.py#L100C47-L100C47

你好,在看代码的时候这里的 X,Y 轴的方向定义我不太理解,因为相机坐标系下的 X 是向右的,Y 是向下的,Z 是垂直相机光心向外的,就像 KITTI 数据集中关于坐标系展示的那样。所以这里的关于 -Y 轴 以及 关于 X 轴角度的计算我不太理解。可以帮我看看吗,非常感谢!

image

Are this method scene-specific?

Hi, thanks for your great work!
I wonder if SceneRF is a scene-specific method or it can be generalized to the unseen scene.

code question

Hi, I'm back again 😂. I seem to find a bug in this repo, but I'm not really sure.

It is in the predict function of scenerf/models/scenerf.py,

        feats_2d_sphere = [sample_feats_2d(x_rgb["1_1"].unsqueeze(0), pix_sphere_coords, (self.out_img_W, self.out_img_H))]
        for scale in [2, 4, 8, 16]:
            key = "1_{}".format(scale)
            feats_2d_sphere.append(sample_feats_2d(x_rgb[key].unsqueeze(0), pix_sphere_coords, (self.out_img_W//scale, self.out_img_H//scale)))
        

The input pix_sphere_coords of sample_feats_2d is used for different downsample resolution, but (img_w, img_H) has beed changed.
In sample_feats_2d, pix_sphere_coords is divided by (img_W, img_H), which will cause the bound of projected_pix becomes much smaller than (-1,1) according to the downsample ratio. This will lead to a lot of zeros in feats_2d.

    projected_pix = (projected_pix / torch.tensor(img_size).type_as(projected_pix).reshape(1, 2)) * 2 - 1
    projected_pix = projected_pix.reshape(1, 1, -1, 2)

Did I make a mistake? Many thanks!

The results of retraining on kitti dataset is worse than the results produced by the pretrained model

I have followed the training pipeline and retrained the model on kitti dataset, but the result is worse than that produced by the pretrained model. I have tried several hyper-parameters(batch_size=4 lr=1.e-5, batch_size=8 lr=2e-5..), the results were still not comparable with the pretrained model.
So would you please provide some more suggestion of the training? Thanks a lot
The visual depth results are showed below
ours:
image
pretrained model:
image

the detph eval metrics are showed below (the results are evaluated on the first 20 images)
ours:
|All |0.206474|1.792310|7.127426|0.358133|0.642755|0.824265|0.903641|00000219|

pretrianed:
|All |0.173536|1.199905|5.350147|0.273417|0.745632|0.901323|0.949406|00000219|

Question about FPS in inference

Hi there again. I want to ask a bit about the inference speed of the model in scene reconstruction (image to voxels). Have your team measured this? Currently in the codebase i'm seeing 3 different stages for inferencing (image2noveldepth, noveldepth2tsdf, tsdf2voxel), I am very curious about this. Hope to hear from you soon.

Some questions about performance against baseline Adabins

Hi there, love your team's work! I just have a small question about the project.
In your paper, specifically table 6, the 2 depth-estimation baseline (AdaBins with LiDAR sup and Monodepth2 with self-sup) seems to have reasonable performance in voxel reconstruction compared to your method. Can you explain more why SceneRF (or other methods such as PixelNeRF) should be investigated, and why we don't just use SOTA depth-estimation method and unproject + voxelized them and call it a day?
image

The details of converting image coordinates to spherical coordinates are somewhat confusing

Hi, thanks for your great work!
I'm a bit confused about coordinate conversion. There are a few questions. Could you please explain it?
First, which kind of camera frame is used in your implementation?
image
Second, in the projection formula described in the paper, what does ▽x and ▽y mean?
Third, does the spherical frame have the same axis as the camera frame?
I understand this process is projecting the image onto a sphere, which enlarges the FOV, but the formula is really difficult to understand if considering details.

environment problem

Hi, I met a bug in DecoderSphere.
feats = F.grid_sample(
x,
map_sphere,
align_corners=False,
mode='bilinear'
)
grid_sampler(): expected grid and input to have same batch size, but got input with sizes [4, 2560, 14, 41] and grid with sizes [1, 1, 658, 2].

Here is my enviroment information. Is there anything wrong? I truly appreciate your help.

Name Version Build Channel

_libgcc_mutex 0.1 main defaults
_openmp_mutex 5.1 1_gnu defaults
absl-py 1.4.0 pyhd8ed1ab_0 conda-forge
addict 2.4.0 pypi_0 pypi
aiohttp 3.7.0 py37h8f50634_0 conda-forge
anyio 3.6.2 pypi_0 pypi
argon2-cffi 21.3.0 pypi_0 pypi
argon2-cffi-bindings 21.2.0 pypi_0 pypi
async-timeout 3.0.1 py_1000 conda-forge
attrs 22.2.0 pyh71513ae_0 conda-forge
backcall 0.2.0 pypi_0 pypi
beautifulsoup4 4.11.2 pypi_0 pypi
blas 1.0 mkl defaults
bleach 6.0.0 pypi_0 pypi
blinker 1.5 pyhd8ed1ab_0 conda-forge
brotlipy 0.7.0 py37h540881e_1004 conda-forge
c-ares 1.18.1 h7f98852_0 conda-forge
ca-certificates 2023.01.10 h06a4308_0 defaults
cachetools 5.3.0 pyhd8ed1ab_0 conda-forge
certifi 2022.12.7 py37h06a4308_0 defaults
cffi 1.15.1 pypi_0 pypi
chardet 3.0.4 py37he5f6b98_1008 conda-forge
charset-normalizer 2.1.1 pyhd8ed1ab_0 conda-forge
click 8.1.3 py37h89c1867_0 conda-forge
colorama 0.4.6 pyhd8ed1ab_0 conda-forge
cryptography 37.0.2 py37h38fbfac_0 conda-forge
cudatoolkit 11.0.221 h6bb024c_0 defaults
cycler 0.11.0 pypi_0 pypi
debugpy 1.6.6 pypi_0 pypi
decorator 5.1.1 pypi_0 pypi
defusedxml 0.7.1 pypi_0 pypi
entrypoints 0.4 pypi_0 pypi
fastjsonschema 2.16.3 pypi_0 pypi
flit-core 3.6.0 pyhd3eb1b0_0 defaults
fonttools 4.38.0 pypi_0 pypi
freetype 2.12.1 h4a9f257_0 defaults
fsspec 2023.1.0 pyhd8ed1ab_0 conda-forge
future 0.18.2 py37h89c1867_5 conda-forge
giflib 5.2.1 h5eee18b_3 defaults
google-auth 2.16.1 pyh1a96a4e_0 conda-forge
google-auth-oauthlib 0.4.6 pyhd8ed1ab_0 conda-forge
grpcio 1.38.1 py37hb27c1af_0 conda-forge
idna 3.4 pyhd8ed1ab_0 conda-forge
imageio 2.26.0 pypi_0 pypi
importlib-metadata 6.0.0 pypi_0 pypi
importlib-resources 5.12.0 pypi_0 pypi
intel-openmp 2021.4.0 h06a4308_3561 defaults
ipykernel 6.16.2 pypi_0 pypi
ipython 7.34.0 pypi_0 pypi
ipython-genutils 0.2.0 pypi_0 pypi
ipywidgets 8.0.4 pypi_0 pypi
jedi 0.18.2 pypi_0 pypi
jinja2 3.1.2 pypi_0 pypi
joblib 1.2.0 pypi_0 pypi
jpeg 9b h024ee3a_2 defaults
jsonschema 4.17.3 pypi_0 pypi
jupyter-client 7.4.9 pypi_0 pypi
jupyter-core 4.12.0 pypi_0 pypi
jupyter-server 1.23.6 pypi_0 pypi
jupyterlab-pygments 0.2.2 pypi_0 pypi
jupyterlab-widgets 3.0.5 pypi_0 pypi
kiwisolver 1.4.4 pypi_0 pypi
lcms2 2.12 h3be6417_0 defaults
ld_impl_linux-64 2.38 h1181459_1 defaults
libffi 3.4.2 h6a678d5_6 defaults
libgcc-ng 11.2.0 h1234567_1 defaults
libgomp 11.2.0 h1234567_1 defaults
libpng 1.6.37 hbc83047_0 defaults
libprotobuf 3.18.0 h780b84a_1 conda-forge
libstdcxx-ng 11.2.0 h1234567_1 defaults
libtiff 4.1.0 h2733197_1 defaults
libuv 1.44.2 h5eee18b_0 defaults
libwebp 1.2.0 h89dd481_0 defaults
llvmlite 0.36.0 pypi_0 pypi
lpips 0.1.4 pypi_0 pypi
lz4-c 1.9.4 h6a678d5_0 defaults
markdown 3.4.1 pyhd8ed1ab_0 conda-forge
markupsafe 2.1.2 pypi_0 pypi
matplotlib 3.5.3 pypi_0 pypi
matplotlib-inline 0.1.6 pypi_0 pypi
mistune 2.0.5 pypi_0 pypi
mkl 2021.4.0 h06a4308_640 defaults
mkl-service 2.4.0 py37h7f8727e_0 defaults
mkl_fft 1.3.1 py37hd3c417c_0 defaults
mkl_random 1.2.2 py37h51133e4_0 defaults
multidict 6.0.2 py37h540881e_1 conda-forge
nbclassic 0.5.2 pypi_0 pypi
nbclient 0.7.2 pypi_0 pypi
nbconvert 7.2.9 pypi_0 pypi
nbformat 5.7.3 pypi_0 pypi
ncurses 6.4 h6a678d5_0 defaults
nest-asyncio 1.5.6 pypi_0 pypi
networkx 2.6.3 pypi_0 pypi
ninja 1.10.2 h06a4308_5 defaults
ninja-base 1.10.2 hd09550d_5 defaults
notebook 6.5.2 pypi_0 pypi
notebook-shim 0.2.2 pypi_0 pypi
numba 0.53.0 pypi_0 pypi
numpy 1.20.3 pypi_0 pypi
oauthlib 3.2.2 pyhd8ed1ab_0 conda-forge
open3d 0.12.0 pypi_0 pypi
open3d-python 0.7.0.0 pypi_0 pypi
opencv-python 4.5.1.48 pypi_0 pypi
openssl 1.1.1t h7f8727e_0 defaults
packaging 23.0 pyhd8ed1ab_0 conda-forge
pandas 1.3.5 pypi_0 pypi
pandocfilters 1.5.0 pypi_0 pypi
parso 0.8.3 pypi_0 pypi
pexpect 4.8.0 pypi_0 pypi
pickleshare 0.7.5 pypi_0 pypi
pillow 9.3.0 py37hace64e9_1 defaults
pip 22.3.1 py37h06a4308_0 defaults
pkgutil-resolve-name 1.3.10 pypi_0 pypi
plyfile 0.7.4 pypi_0 pypi
prometheus-client 0.16.0 pypi_0 pypi
prompt-toolkit 3.0.38 pypi_0 pypi
protobuf 3.18.0 py37hcd2ae1e_0 conda-forge
psutil 5.9.4 pypi_0 pypi
ptyprocess 0.7.0 pypi_0 pypi
pyasn1 0.4.8 py_0 conda-forge
pyasn1-modules 0.2.7 py_0 conda-forge
pycparser 2.21 pyhd8ed1ab_0 conda-forge
pydeprecate 0.3.1 pyhd8ed1ab_0 conda-forge
pygments 2.14.0 pypi_0 pypi
pyjwt 2.6.0 pyhd8ed1ab_0 conda-forge
pyopenssl 22.0.0 pyhd8ed1ab_1 conda-forge
pyparsing 3.0.9 pypi_0 pypi
pyrsistent 0.19.3 pypi_0 pypi
pysocks 1.7.1 py37h89c1867_5 conda-forge
python 3.7.16 h7a1cb2a_0 defaults
python-dateutil 2.8.2 pypi_0 pypi
python_abi 3.7 2_cp37m conda-forge
pytorch 1.7.1 py3.7_cuda11.0.221_cudnn8.0.5_0 pytorch
pytorch-lightning 1.4.9 pyhd8ed1ab_0 conda-forge
pytz 2022.7.1 pypi_0 pypi
pyu2f 0.1.5 pyhd8ed1ab_0 conda-forge
pywavelets 1.3.0 pypi_0 pypi
pyyaml 6.0 py37h540881e_4 conda-forge
pyzmq 25.0.0 pypi_0 pypi
readline 8.2 h5eee18b_0 defaults
requests 2.28.2 pyhd8ed1ab_0 conda-forge
requests-oauthlib 1.3.1 pyhd8ed1ab_0 conda-forge
rsa 4.9 pyhd8ed1ab_0 conda-forge
scenerf 0.0.0 dev_0
scikit-image 0.18.1 pypi_0 pypi
scikit-learn 0.24.0 pypi_0 pypi
scipy 1.7.3 pypi_0 pypi
send2trash 1.8.0 pypi_0 pypi
setuptools 65.6.3 py37h06a4308_0 defaults
six 1.16.0 pyhd3eb1b0_1 defaults
sklearn 0.0.post1 pypi_0 pypi
sniffio 1.3.0 pypi_0 pypi
soupsieve 2.4 pypi_0 pypi
sqlite 3.40.1 h5082296_0 defaults
tbb 2020.2 hff7bd54_0 defaults
tensorboard 2.11.2 pyhd8ed1ab_0 conda-forge
tensorboard-data-server 0.6.0 py37h38fbfac_2 conda-forge
tensorboard-plugin-wit 1.8.1 pyhd8ed1ab_0 conda-forge
terminado 0.17.1 pypi_0 pypi
threadpoolctl 3.1.0 pypi_0 pypi
tifffile 2021.11.2 pypi_0 pypi
tinycss2 1.2.1 pypi_0 pypi
tk 8.6.12 h1ccaba5_0 defaults
torchaudio 0.7.2 py37 pytorch
torchmetrics 0.6.0 pypi_0 pypi
torchvision 0.8.2 py37_cu110 pytorch
tornado 6.2 pypi_0 pypi
tqdm 4.49.0 pypi_0 pypi
traitlets 5.9.0 pypi_0 pypi
typing_extensions 4.4.0 py37h06a4308_0 defaults
urllib3 1.26.14 pyhd8ed1ab_0 conda-forge
wcwidth 0.2.6 pypi_0 pypi
webencodings 0.5.1 pypi_0 pypi
websocket-client 1.5.1 pypi_0 pypi
werkzeug 2.2.3 pyhd8ed1ab_0 conda-forge
wheel 0.38.4 py37h06a4308_0 defaults
widgetsnbextension 4.0.5 pypi_0 pypi
xz 5.2.10 h5eee18b_1 defaults
yaml 0.2.5 h7f98852_2 conda-forge
yarl 1.6.0 py37h8f50634_0 conda-forge
zipp 3.15.0 pyhd8ed1ab_0 conda-forge
zlib 1.2.13 h5eee18b_0 defaults
zstd 1.4.9 haebb681_0 defaults

No module named 'scenerf'

(scenerf) root@autodl-container-9cb9118e00-b877646d:~/autodl-tmp/SceneRF# python scenerf/scripts/train_kitti.py --bs=1 --n_gpus=1 --enable_log=True --preprocess_root=$KITTI_PREPROCESS --root=$KITTI_ROOT --logdir=$KITTI_LOG --n_gaussians=4 --n_pts_per_gaussian=8 --max_epochs=50 --exp_prefix=Train
Traceback (most recent call last):
File "scenerf/scripts/train_kitti.py", line 8, in
from scenerf.data.semantic_kitti.kitti_dm import KittiDataModule
ModuleNotFoundError: No module named 'scenerf'

There's nothing wrong with the reference path, why can't I find scenerf?

Question about Function "depth2disp"

I have a question about the function "depth2disp" which is defined in "scenerf/models/utils.py":

def depth2disp(depth, min_depth=0.1, max_depth=100):
    """Convert depth to disp
    """
    depth = torch.clamp(depth, min=min_depth, max=max_depth)
    min_disp = 1 / max_depth
    max_disp = 1 / min_depth
    scaled_disp = 1 / depth
    disp = scaled_disp - min_disp / (max_disp - min_disp)

    return disp

Is the expression "disp = scaled_disp - min_disp / (max_disp - min_disp)" missing a parenthesis?I guess it should be "disp = (scaled_disp - min_disp) / (max_disp - min_disp)"?

Bugs in generate_novel_depths.py

There is a bug in scenerf/scripts/reconstruction/generate_novel_depths.py. The step variable on L70 for computing poses is overwritten in the inner for loop on L82. This results in computing depth with only 0m and 10m, ignoring 0.5m, 1.0m, 1.5m, etc.

Questions about code

Hi, thanks for your kind help last time. Now I'm learning NeRF from your code. It's a really great work but I am not good at coding. I met some problems in learning. I will try to list them below.

  1. I find some conv layers seem not to be used in the network. They are self.resize_1_1 to self.resize_output_1_16 in scenerf/models/unet2d_sphere.py. Should I delete these layers?

  2. I find 'steps' appear repeatedly in scenerf/models/utils/sample_rel_poses. Should I use the first line?
    steps = torch.arange(start=0, end=max_distance, step=step)
    steps = torch.arange(start=0, end=0.6, step=0.5)

  3. In scenerf/models/utils/uniform_sampling, the step of noise seems not to be consistent with sensor_distance_sampled, as the intervals of torch.linspace will be n_pts_per_ray-1 instead of n_pts_per_ray. Is this ok?

Thank you very much again!

Error in Chekcpoints Saving

I tried to run the training script on SemanticKITTI dataset. However, I find the training process only saves the model at epoch 0.

I noticed that in in scenerf/scripts/train_kitti.py, the checkpoint is defined as

ModelCheckpoint(
    save_last=True,
    monitor="valdepth/abs_rel",
    save_top_k=1,
    mode="max",
    filename="{epoch:03d}-{valdepth/abs_rel:.4f}",
)

I suppose the saving mode max is a typo and it should be min. Please let me know if I'm correct. Thank you.

train semantickitti problem

Hi, wonderful and very novel job!
by running train_kitti.py, I found unexpected argument 'dataset' when instancing model,
so I just delete the argument 'dataset', as in the picture
rfq
And then the program runs perfectly.

Is the argument 'dataset' useless?
Thank u

Can the scene be reconstructed in 3D?

Hello, thank you very much for your great work. Can you tell me if this model can be used to reconstruct a 3D scene, based on monocular video (video obtained without camera parameters, only with cell phone recording)?

About Scene Reconstruction Performance

Hi all. I'm trying to evaluate this method on Semantic KITTI using the provided pretrained model. But I got some less-than-one numbers in all three metrics. Orz
image

I checked the TSDF results and found that it seemed like the prediction of voxels was strange. Below is a comparison of ground truth (left) and my prediction (right).

3@FHZFK793PYPH M%NI~O

I was wondering if you had any insight about what might be happening. Thx!

FileNotFoundError: [Errno 2] No such file or directory: '/SHFP12/02_bevdet/SceneRF/kitti_odometry/dataset/sequences/00/voxels/003228.invalid'

Hi, @anhquancao
I found there is no "003228.invalid" in the the SemanticKITTI voxel data .
How can you fixed this issue?

    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/SHFP12/02_bevdet/SceneRF/scenerf/data/semantic_kitti/kitti_dataset.py", line 403, in __getitem__
    data['target_1_1'] = self.read_semKITTI_label(label_path, invalid_path)
  File "/SHFP12/02_bevdet/SceneRF/scenerf/data/semantic_kitti/kitti_dataset.py", line 413, in read_semKITTI_label
    INVALID = SemanticKittiIO._read_invalid_SemKITTI(invalid_path)
  File "/SHFP12/02_bevdet/SceneRF/scenerf/data/semantic_kitti/io_data.py", line 126, in _read_invalid_SemKITTI
    invalid = _read_SemKITTI(path, dtype=np.uint8, do_unpack=True)
  File "/SHFP12/02_bevdet/SceneRF/scenerf/data/semantic_kitti/io_data.py", line 114, in _read_SemKITTI
    bin = np.fromfile(path, dtype=dtype)  # Flattened array
FileNotFoundError: [Errno 2] No such file or directory: '/SHFP12/02_bevdet/SceneRF/kitti_odometry/dataset/sequences/00/voxels/003228.invalid'

ERROR: Unexpected segmentation fault encountered in worker.

Hi
I am trying to train the model from scratch with this command:

python3 scenerf/scripts/train.py \
    --bs=1 --n_gpus=1 --enable_log=True \
    --preprocess_root=/home/trainer/Datasets/preprocess \
    --root=/home/trainer/Datasets/Kitti/ \
    --logdir=./kitti/logs \
    --n_gaussians=4 --n_pts_per_gaussian=8 --max_epochs=50 --exp_prefix=Train

But faced this problem:

root@devbox:/home/trainer/scenerf# ./train.sh 
Global seed set to 42
Using cache found in /root/.cache/torch/hub/rwightman_gen-efficientnet-pytorch_master
Loading base model ()...Done.
Removing last two layers (global_pool & classifier).
Building Encoder-Decoder model..Done.
GPU available: True, used: True
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
Global seed set to 42
initializing ddp: GLOBAL_RANK: 0, MEMBER: 1/1
----------------------------------------------------------------------------------------------------
distributed_backend=nccl
All DDP processes registered. Starting ddp with 1 processes
----------------------------------------------------------------------------------------------------

00 5 23
01 4 11
02 7 21
03 10 20
04 7 8
05 2 22
06 7 23
07 2 22
09 7 20
10 5 20
Preprocess time: --- 3.7724807262420654 seconds ---
08 2 23
Preprocess time: --- 0.8777365684509277 seconds ---
LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0]

  | Name              | Type               | Params
---------------------------------------------------------
0 | spherical_mapping | SphericalMapping   | 0     
1 | net_rgb           | UNet2DSphere       | 231 M 
2 | pe                | PositionalEncoding | 0     
3 | mlp               | ResnetFC           | 5.4 M 
4 | mlp_gaussian      | ResnetFC           | 5.4 M 
5 | ray_som           | RaySOM             | 0     
---------------------------------------------------------
242 M     Trainable params
0         Non-trainable params
242 M     Total params
970.275   Total estimated model params size (MB)
Validation sanity check:   0%|                                                                                                                                            | 0/2 [00:00<?, ?it/s]ERROR: Unexpected segmentation fault encountered in worker.
ERROR: Unexpected segmentation fault encountered in worker.
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/dataloader.py", line 1120, in _try_get_data
    data = self._data_queue.get(timeout=timeout)
  File "/usr/lib/python3.8/queue.py", line 179, in get
    self.not_empty.wait(remaining)
  File "/usr/lib/python3.8/threading.py", line 306, in wait
    gotit = waiter.acquire(True, timeout)
  File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/_utils/signal_handling.py", line 66, in handler
    _error_if_any_worker_fails()
RuntimeError: DataLoader worker (pid 6354) is killed by signal: Segmentation fault. 

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "scenerf/scripts/train.py", line 161, in <module>
    main()
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "scenerf/scripts/train.py", line 156, in main
    trainer.fit(model, data_module)
  File "/usr/local/lib/python3.8/dist-packages/pytorch_lightning/trainer/trainer.py", line 552, in fit
    self._run(model)
  File "/usr/local/lib/python3.8/dist-packages/pytorch_lightning/trainer/trainer.py", line 922, in _run
    self._dispatch()
  File "/usr/local/lib/python3.8/dist-packages/pytorch_lightning/trainer/trainer.py", line 990, in _dispatch
    self.accelerator.start_training(self)
  File "/usr/local/lib/python3.8/dist-packages/pytorch_lightning/accelerators/accelerator.py", line 92, in start_training
    self.training_type_plugin.start_training(trainer)
  File "/usr/local/lib/python3.8/dist-packages/pytorch_lightning/plugins/training_type/training_type_plugin.py", line 161, in start_training
    self._results = trainer.run_stage()
  File "/usr/local/lib/python3.8/dist-packages/pytorch_lightning/trainer/trainer.py", line 1000, in run_stage
    return self._run_train()
  File "/usr/local/lib/python3.8/dist-packages/pytorch_lightning/trainer/trainer.py", line 1035, in _run_train
    self._run_sanity_check(self.lightning_module)
  File "/usr/local/lib/python3.8/dist-packages/pytorch_lightning/trainer/trainer.py", line 1122, in _run_sanity_check
    self._evaluation_loop.run()
  File "/usr/local/lib/python3.8/dist-packages/pytorch_lightning/loops/base.py", line 111, in run
    self.advance(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/pytorch_lightning/loops/dataloader/evaluation_loop.py", line 110, in advance
    dl_outputs = self.epoch_loop.run(
  File "/usr/local/lib/python3.8/dist-packages/pytorch_lightning/loops/base.py", line 111, in run
    self.advance(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/pytorch_lightning/loops/epoch/evaluation_epoch_loop.py", line 94, in advance
    batch_idx, batch = next(dataloader_iter)
  File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/dataloader.py", line 628, in __next__
    data = self._next_data()
  File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/dataloader.py", line 1316, in _next_data
    idx, data = self._get_data()
  File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/dataloader.py", line 1272, in _get_data
    success, data = self._try_get_data()
  File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/dataloader.py", line 1133, in _try_get_data
    raise RuntimeError('DataLoader worker (pid(s) {}) exited unexpectedly'.format(pids_str)) from e
RuntimeError: DataLoader worker (pid(s) 6354) exited unexpectedly
ERROR: Unexpected segmentation fault encountered in worker.

I think that the error is happing in this function:

def vox2world(vol_origin, vox_coords, vox_size):

Any suggestion?

Pretrained model checkoint

Hello!

Thanks for the amazing work and discovering the source code.
I would like to try the pre-trained model, but goodle drive says that the ckpt file has been moved to the trash and viewers cannot download it.

Could you please share the actual link to the pre-trained ckpt file?

image

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.