Coder Social home page Coder Social logo

jumpat / segmentanythingin3d Goto Github PK

View Code? Open in Web Editor NEW
856.0 16.0 52.0 132.43 MB

Segment Anything in 3D with NeRFs (NeurIPS 2023)

License: Apache License 2.0

Python 85.53% CSS 5.40% C++ 2.32% Cuda 6.57% Shell 0.19%
3d 3d-segmentation computer-vision nerf segment-anything segmentation deep-learning

segmentanythingin3d's Introduction

Segment Anything🤖️ in 3D with NeRFs (SA3D)

Segment Anything in 3D with NeRFs
Jiazhong Cen1*, Zanwei Zhou1*, Jiemin Fang2,3†, Chen Yang1, Wei Shen1✉, Lingxi Xie2, Dongsheng Jiang2, Xiaopeng Zhang2, Qi Tian2
1AI Institute, SJTU   2Huawei Inc   3School of EIC, HUST .
*denotes equal contribution
†denotes project lead.

Given a NeRF, just input prompts from one single view and then get your 3D model.

We propose a novel framework to Segment Anything in 3D, named SA3D. Given a neural radiance field (NeRF) model, SA3D allows users to obtain the 3D segmentation result of any target object via only one-shot manual prompting in a single rendered view. The entire process for obtaining the target 3D model can be completed in approximately 2 minutes, yet without any engineering optimization. Our experiments demonstrate the effectiveness of SA3D in different scenes, highlighting the potential of SAM in 3D scene perception.

Update

  • 2024/04/16: We release the 3D-GS version of SA3D (here). Now 3D segmentation can be achieved within seconds!
  • 2023/11/11: We release the nerfstudio version of SA3D (here)! Currently it only supports the text prompt as input.
  • 2023/06/29: We now support MobileSAM as the segmentation network. Follow the installation instruction in MobileSAM, and then download mobile_sam.pt into folder ./dependencies/sam_ckpt. You can use --mobile_sam to switch to MobileSAM.

Overall Pipeline

SA3D_pipeline

With input prompts, SAM cuts out the target object from the according view. The obtained 2D segmentation mask is projected onto 3D mask grids via density-guided inverse rendering. 2D masks from other views are then rendered, which are mostly uncompleted but used as cross-view self-prompts to be fed into SAM again. Complete masks can be obtained and projected onto mask grids. This procedure is executed via an iterative manner while accurate 3D masks can be finally learned. SA3D can adapt to various radiance fields effectively without any additional redesigning.

Installation

git clone https://github.com/Jumpat/SegmentAnythingin3D.git
cd SegmentAnythingin3D

conda create -n sa3d python=3.10
conda activate sa3d
pip install -r requirements.txt

SAM and Grounding-DINO:

# Installing SAM
mkdir dependencies; cd dependencies 
mkdir sam_ckpt; cd sam_ckpt
wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth
git clone [email protected]:facebookresearch/segment-anything.git 
cd segment-anything; pip install -e .

# Installing Grounding-DINO
git clone https://github.com/IDEA-Research/GroundingDINO.git
cd GroundingDINO/; pip install -e .
mkdir weights; cd weights
wget https://github.com/IDEA-Research/GroundingDINO/releases/download/v0.1.0-alpha/groundingdino_swint_ogc.pth

Download Data

We now release the configs on these datasets:

Data structure:

(click to expand)
data
├── 360_v2             # Link: https://jonbarron.info/mipnerf360/
│   └── [bicycle|bonsai|counter|garden|kitchen|room|stump]
│       ├── poses_bounds.npy
│       └── [images|images_2|images_4|images_8]
│
├── nerf_llff_data     # Link: https://drive.google.com/drive/folders/14boI-o5hGO9srnWaaogTU5_ji7wkX2S7
│   └── [fern|flower|fortress|horns|leaves|orchids|room|trex]
│       ├── poses_bounds.npy
│       └── [images|images_2|images_4|images_8]
│
└── lerf_data               # Link: https://drive.google.com/drive/folders/1vh0mSl7v29yaGsxleadcj-LCZOE_WEWB
    └── [book_store|bouquet|donuts|...]
        ├── transforms.json
        └── [images|images_2|images_4|images_8]

Usage

  • Train NeRF
    python run.py --config=configs/llff/fern.py --stop_at=20000 --render_video --i_weights=10000
  • Run SA3D in GUI
    python run_seg_gui.py --config=configs/llff/seg/seg_fern.py --segment \
    --sp_name=_gui --num_prompts=20 \
    --render_opt=train --save_ckpt
  • Render and Save Fly-through Videos
    python run_seg_gui.py --config=configs/llff/seg/seg_fern.py --segment \
    --sp_name=_gui --num_prompts=20 \
    --render_only --render_opt=video --dump_images \
    --seg_type seg_img seg_density

Some tips when run SA3D:

  • Increase --num_prompts when the target object is extremely irregular like LLFF scenes Fern and Trex;
  • Use --seg_poses to specify the camera pose sequence used for training 3D mask, default='train', choices=['train', 'video'].

Using our Dash based GUI:

  • Select which type of prompt to be used, currently support: Point Prompt and Text Prompt;

    • Point Prompt: select Points in the drop down; click the original image to add a point prompt, then SAM will produce candidate masks; click Clear Points to clear out the previous inputs;

      point_prompt.mp4
    • Text Prompt: select Text in the drop down;input your text prompt and click Generate to get candidate masks; note that unreasonable text input may cause error.

      text_prompt.mp4
  • Select your target mask;

  • Press Start Training to run SA3D; we visualize rendered masks and SAM predictions produced by our cross-view self-prompting stategy;

    start_train.mp4
  • Wait a few minutes to see the final rendering results.

    results.mp4

TODO List

  • Refine the GUI, e.g., start from any train view, add more training hyper-parameter options, etc.;
  • Support the two-pass stage in GUI; currently it may have some bugs.

Some Visualization Samples

SA3D can handle various scenes for 3D segmentation. Find more demos in our project page.

Forward facing 360° Multi-objects

Acknowledgements

Thanks for the following project for their valuable contributions:

Citation

If you find this project helpful for your research, please consider citing the report and giving a ⭐.

@inproceedings{cen2023segment,
      title={Segment Anything in 3D with NeRFs}, 
      author={Jiazhong Cen and Zanwei Zhou and Jiemin Fang and Chen Yang and Wei Shen and Lingxi Xie and Dongsheng Jiang and Xiaopeng Zhang and Qi Tian},
      booktitle    = {NeurIPS},
      year         = {2023},
}

segmentanythingin3d's People

Contributors

chensjtu avatar jaminfong avatar jumpat avatar viettham1998 avatar zanue 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  avatar  avatar

segmentanythingin3d's Issues

Runtime Error on MipNeRF-360 dataset

When I run the following commond :
python run_seg_gui.py --config=configs/nerf_unbounded/seg_garden.py --segment --sp_name=_gui --num_prompts=20 --render_opt=train --save_ckpt

I get this error :
AttributeError: 'Flask' object has no attribute 'before_first_request'. Did you mean: '_got_first_request'?

Did anyone face this issue ?

Mesh extraction

Hello,

How can I extract the mesh of the object after segmentation?

Thank you

requests.exceptions.ProxyError when using text prompt

thank for your great jobs! it is ok when i use point prompt,but i meet this error when i try text prompt.
requests.exceptions.ProxyError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded w
ith url: /bert-base-uncased/resolve/main/tokenizer_config.json (Caused by ProxyError('Cannot connect to prox
y.', NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fcbd46a6140>: Failed to establish
a new connection: [Errno 113] No route to host'))
image

How to run metashape xml files on sa3d?

Hi, Thanks for your work!

Now I want to run a mask on sa3d with some data calibrated by metashape, which data format should I convert to? The coordinate system of various data formats is different, I am confused about this, can you help me?

Evaluation on SPIn-NeRF dataset

Hi, thank you for your amazing work.

I wonder how many views are used to train the model and do the evaluation? I have read the SPIn-NeRF paper, but I didn't find it. May I have overlooked something. Could u please tell me or give me some instructions on how to find it?

Thanks a lot!!!

sam raw images directly

Thanks for your great jobs!
When I run run_seg_gui.py to get the masks,I found that the the images are rendered after nerf.And --render_opt=train also just get the rendered images with the same camera poses of raw images, but I want to get the masks of raw images.So i wonder does this project provide the function that could sam the raw images directly?

mmcv环境配置问题

请问是如何配置mmcv呢,我在官网上没有看到支持torch1.12.1的版本,我是用pip install mmcv-full==1.6.2 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.12.1/index.html下载的,会报错,我的cuda是11.3,显卡是RTX 3090,可以告诉我详细的环境或步骤吗?

Please tell me how to configure mmcv, I don't see support for torch 1.12.1 on the official website, I am using pip install mmcv-full==1.6.2 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.12.1/ index.html download, will report an error, my cuda is 11.3, can you tell me the details of the environment or steps

360° scene with multiple objects

thank for you great works!
And i am curious about whether sam3d could work on a 360° scene with multiple objects.if yes which config should i choose to get the best output?

Dash and graphics memery

Hi, very fortunate to see such innovative work! I tried using the dash link in the readme but didn't find the app this article is working on, also is there a way to reduce the gaphics memory consumption by modifying the parameters in config.py?

how to install

According to the code given, I cannot configure it successfully. I would like to ask if anyone has successfully configured it?

running nerfstudio project

I was running your NerfStudio project :Lower than IoU threshold, Unacceptable!

Rendered Mask Scores: Min: -1.152597, Max: 1.236586
Have selected 1/1 prompts
Current IoU is: 0.097463
Lower than IoU threshold, Unacceptable!

Rendered Mask Scores: Min: -1.149462, Max: 1.232445
Have selected 1/1 prompts
Current IoU is: 0.109395
Lower than IoU threshold, Unacceptable!

Rendered Mask Scores: Min: -1.149782, Max: 1.235614
Have selected 1/1 prompts

Is it normal to get these prompts during the operation?

(nerfstudio version)AttributeError: 'SA3DTrainer' object has no attribute 'is_training'

When I run the nerfstudio version SA3D

Traceback (most recent call last):
File "/root/miniconda3/envs/nerfstudio/bin/ns-train", line 8, in
sys.exit(entrypoint())
File "/root/miniconda3/envs/nerfstudio/lib/python3.10/site-packages/nerfstudio/scripts/train.py", line 262, in entrypoint
main(
File "/root/miniconda3/envs/nerfstudio/lib/python3.10/site-packages/nerfstudio/scripts/train.py", line 247, in main
launch(
File "/root/miniconda3/envs/nerfstudio/lib/python3.10/site-packages/nerfstudio/scripts/train.py", line 189, in launch
main_func(local_rank=0, world_size=world_size, config=config)
File "/root/miniconda3/envs/nerfstudio/lib/python3.10/site-packages/nerfstudio/scripts/train.py", line 100, in train_loop
trainer.train()
File "/root/tmp/SegmentAnythingin3D/sa3d/sa3d_trainer.py", line 211, in train
while not self.is_training:
AttributeError: 'SA3DTrainer' object has no attribute 'is_training'

I noticed that neither the 'SA3DTrainer' class nor its parent class, 'nerfstudio.engine.trainer', has the attribute 'is_training'
How can I solve this problem.

Get the error when running run_seg_gui.py

Hi!
First, thanks for releasing the code!
I got a problem when running run_seg_gui.py. After clicking start training bottom, this error message poped out:

Traceback (most recent call last):
 File "/home/SegmentAnythingin3D/sa3d/lib/python3.10/site-packages/flask/app.py", line 2073, in wsgi_app
   response = self.full_dispatch_request()
 File "/home/SegmentAnythingin3D/sa3d/lib/python3.10/site-packages/flask/app.py", line 1519, in full_dispatch_request
   rv = self.handle_user_exception(e)
 File "/home/SegmentAnythingin3D/sa3d/lib/python3.10/site-packages/flask/app.py", line 1517, in full_dispatch_request
   rv = self.dispatch_request()
 File "/home/SegmentAnythingin3D/sa3d/lib/python3.10/site-packages/flask/app.py", line 1503, in dispatch_request
   return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
 File "/home/SegmentAnythingin3D/sa3d/lib/python3.10/site-packages/dash/dash.py", line 1265, in dispatch
   ctx.run(
 File "/home/SegmentAnythingin3D/sa3d/lib/python3.10/site-packages/dash/_callback.py", line 450, in add_context
   output_value = func(*func_args, **func_kwargs)  # %% callback invoked %%
 File "/home/SegmentAnythingin3D/lib/gui.py", line 326, in start_training
   self.Seg3d.train_step(self.train_idx, sam_mask=ctx['masks'][ctx['select_mask_id']])
 File "/home/SegmentAnythingin3D/lib/sam3d.py", line 189, in train_step
   self.inverse(seg_m, sam_mask)
 File "/home/SegmentAnythingin3D/lib/sam3d.py", line 176, in inverse
   optim(self.optimizer, loss, model=self.render_viewpoints_kwargs['model'])
 File "/home/SegmentAnythingin3D/lib/sam3d.py", line 550, in optim
   loss.backward()
 File "/home/SegmentAnythingin3D/sa3d/lib/python3.10/site-packages/torch/_tensor.py", line 488, in backward
   torch.autograd.backward(
 File "/home/SegmentAnythingin3D/sa3d/lib/python3.10/site-packages/torch/autograd/__init__.py", line 197, in backward
   Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [1, 1, 320, 320, 320]] is at version 2; expected version 0 instead. Hint: the backtrace further above shows the operation that failed to compute its gradient. The variable in question was changed in there or anywhere later. Good luck!

Looks like this is a library issue. Wondering any body has the idea to solve this?

rendered mask smaller than the sam mask result

The rendered mask is smaller (shrinked) than the sam mask in all iterations. The iou in all iterations is less than 0.5 therefore the loss is not updated here and probably the training doesn't happen. In the test_render visualization results, the rendered mask is small in initial poses, gradually fully disappear in later poses.

I was wondering why the rendered mask is smaller than the sam mask in the initial training step. Probably the seg_grid represents the V voxel grid and represents the probability of mask score so can it be possible the describe the intuition for not having full sam mask in the rendered result.

When I lower the IoU threshold, the points resulting from self prompting starts propagating to nearby objects as well which are not the part of the object with input prompt.

Any suggestion and explanation here would be highly appreciated.

Thank you very much!

Suggestion - Integrate MobileSAM into the pipeline for lightweight and faster inference

Reference: https://github.com/ChaoningZhang/MobileSAM

Our project performs on par with the original SAM and keeps exactly the same pipeline as the original SAM except for a change on the image encode, therefore, it is easy to Integrate into any project.

MobileSAM is around 60 times smaller and around 50 times faster than original SAM, and it is around 7 times smaller and around 5 times faster than the concurrent FastSAM. The comparison of the whole pipeline is summarzed as follows:

image

image

Best Wishes,

Qiao

No module named 'addict'

Traceback (most recent call last):
File "G:\neural code\SegmentAnythingin3D-main\run_seg_gui.py", line 11, in
from lib.config_loader import Config
File "G:\neural code\SegmentAnythingin3D-main\lib\config_loader.py", line 18, in
from addict import Dict
ModuleNotFoundError: No module named 'addict'

why?是提示没有数据集吗

Not segmenting

I tried prompting using point and text, get the mask0,1,2, choose one mask, click 'generate'. But I the SAM part is always black screen and in the terminal it shows: tmp min: tensor(0.) tmp max: tensor(0.) No prompt is available. I am wondering how to solve this? Thank you so much for help!

Export 2D masks for SA3D's rendered images

Hi,
Congrats for the great work!
I want to know if you provide an easy way to get all the 2D binary mask for the final results after applying your SA3D. For example, I tried the "Fern" case and I found .mp4 videos of rendered images and masks in the log directory. So does your code provide any part that I can output .png files of RGB image and binary mask for the 16 views or I should just take the .mp4 file and take out each frame by myself?
Thanks again!

训练Nerf阶段,渲染生成的视频只有部分,感觉相机路径只用了部分。且运行sa3d时报错

我的脚本如下:
python run.py --config=configs\nerf_unbounded\motuo_bonsai_video.py --stop_at=20000 --render_video --i_weights=10000,
配置文件只是复制重命名了一下,然后把里面的文件路径改了,是我自己的数据集。
数据集制作的方式是,利用llff的脚本(https://github.com/Fyusion/LLFF/blob/master/imgs2poses.py)生成poses.npy文件,然后训练,渲染的视频如图所示,
out
请问是什么问题?
然后还有一个问题是,我拿这个训练完的结果,去运行sa3d,
脚本如下:

python run_seg_gui.py --config=configs\nerf_unbounded\seg_motuo_bonsai_video.py --segment --sp_name=_gui --num_prompts=20 --render_opt=train --save_ckpt
报错如下:
Loading images from ./data/motuo_garden\images_4
100%|███████████████████████████████████████████████████████████████████████████████| 443/443 [00:02<00:00, 167.67it/s]
Loaded image data (540, 962, 3, 443) [540. 962. 700.22906946]
Loaded ./data/motuo_garden 1.2512208185991929 41.334755104635775
D:\WORK\SegmentAnythingin3D\lib\load_llff.py:252: UserWarning: Optimal rotation is not uniquely or poorly defined for the given sets of vectors.
R = scipy.spatial.transform.Rotation.align_vectors(
Data:
(443, 3, 5) (443, 540, 962, 3) (443, 2)
HOLDOUT view is 141
Loaded llff (443, 540, 962, 3) torch.Size([200, 3, 5]) [540. 962. 700.22906] ./data/motuo_garden
Auto LLFF holdout, 8
DEFINING BOUNDS
near_clip 0.29413895308971405
original far 10.796710014343262
NEAR FAR 0 2.3278315
train: start
compute_bbox_by_cam_frustrm: start
C:\software\miniconda3\envs\sa3d\lib\site-packages\torch\functional.py:478: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ..\aten\src\ATen\native\TensorShape.cpp:2895.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
compute_bbox_by_cam_frustrm: xyz_min tensor([-0.9019, -0.8944, -0.7016])
compute_bbox_by_cam_frustrm: xyz_max tensor([0.8534, 0.8608, 1.0537])
compute_bbox_by_cam_frustrm: finish
SAM initializd.
Traceback (most recent call last):
File "D:\WORK\SegmentAnythingin3D\run_seg_gui.py", line 103, in
train_seg(args, cfg, data_dict)
File "D:\WORK\SegmentAnythingin3D\run_seg_gui.py", line 52, in train_seg
gui.run()
File "D:\WORK\SegmentAnythingin3D\lib\gui.py", line 58, in run
init_rgb = self.Seg3d.init_model()
File "D:\WORK\SegmentAnythingin3D\lib\sam3d.py", line 83, in init_model
assert reload_ckpt_path is not None and 'segmentation must based on a pretrained NeRF'
AssertionError

请问这个怎么解决,是哪里出了问题,我理解只要文件结构和项目文档一样,应该就可以运行吧。还请您帮忙看看,谢谢

Explanation Needed on `dual_seg_mask_grid` Usage in Fine Stage

Hello,

While going through the code in seg_dvgo.py, I've noticed the usage of dual_seg_mask_grid in line 70. From my observation, the parameters and training process of dual_seg_mask_grid appear identical to seg_mask_grid. And, dual_seg_mask_grid seems to be used only when calculating loss in the fine stage. In the fine stage, the loss is computed for both seg_mask_grid and dual_seg_mask_grid in the same manner, and the output loss is the sum of these two losses.

Could you provide some clarity on the rationale behind introducing an additional dual_seg_mask_grid during the fine stage? Is there a specific reason or advantage to this approach?

Thank you for your time, and I look forward to your clarification.

Entry Point Not Found

After running python run.py or python run_seg_gui.py the following error showing:

In a separate GUI:
Error Image GUI

In the command line:
Error In Command Line

My conda env list (generated using conda list > file.txt):

Package Name Version Build Channel
addict 2.4.0 pypi_0 pypi
blinker 1.6.2 pypi_0 pypi
brotli 1.0.9 pypi_0 pypi
bzip2 1.0.8 h8ffe710_4 conda-forge
ca-certificates 2023.7.22 h56e8100_0 conda-forge
certifi 2023.7.22 pyhd8ed1ab_0 conda-forge
charset-normalizer 2.1.1 pypi_0 pypi
click 8.1.6 pypi_0 pypi
colorama 0.4.6 pypi_0 pypi
contourpy 1.1.0 pypi_0 pypi
cycler 0.11.0 pypi_0 pypi
dash 2.6.2 pypi_0 pypi
dash-core-components 2.0.0 pypi_0 pypi
dash-html-components 2.0.0 pypi_0 pypi
dash-table 5.0.0 pypi_0 pypi
filelock 3.9.0 pypi_0 pypi
flask 2.3.2 pypi_0 pypi
flask-compress 1.13 pypi_0 pypi
fonttools 4.42.0 pypi_0 pypi
fsspec 2023.6.0 pypi_0 pypi
huggingface-hub 0.14.1 pypi_0 pypi
idna 3.4 pypi_0 pypi
imageio 2.22.2 pypi_0 pypi
importlib-metadata 6.8.0 pypi_0 pypi
itsdangerous 2.1.2 pypi_0 pypi
jinja2 3.1.2 pypi_0 pypi
kiwisolver 1.4.4 pypi_0 pypi
libffi 3.4.2 h8ffe710_5 conda-forge
libsqlite 3.42.0 hcfcfb64_0 conda-forge
libzlib 1.2.13 hcfcfb64_5 conda-forge
lpips 0.1.4 pypi_0 pypi
markupsafe 2.1.2 pypi_0 pypi
matplotlib 3.7.1 pypi_0 pypi
mmcv-full 1.6.2 pypi_0 pypi
mpmath 1.2.1 pypi_0 pypi
networkx 3.0 pypi_0 pypi
ninja 1.11.1 pypi_0 pypi
numpy 1.23.3 pypi_0 pypi
opencv-python 4.6.0.66 pypi_0 pypi
openssl 3.1.2 hcfcfb64_0 conda-forge
packaging 23.1 pypi_0 pypi
pillow 9.2.0 pypi_0 pypi
pip 23.2.1 pyhd8ed1ab_0 conda-forge
platformdirs 3.10.0 pypi_0 pypi
plotly 5.10.0 pypi_0 pypi
pycocotools 2.0.5 pypi_0 pypi
pyparsing 3.0.9 pypi_0 pypi
python 3.10.12 h4de0772_0_cpython conda-forge
python-dateutil 2.8.2 pypi_0 pypi
pywavelets 1.4.1 pypi_0 pypi
pyyaml 6.0 pypi_0 pypi
regex 2023.8.8 pypi_0 pypi
requests 2.28.1 pypi_0 pypi
scikit-image 0.19.3 pypi_0 pypi
scipy 1.10.0 pypi_0 pypi
segment-anything 1.0 dev_0
setuptools 63.4.1 pypi_0 pypi
six 1.16.0 pypi_0 pypi
supervision 0.6.0 pypi_0 pypi
sympy 1.11.1 pypi_0 pypi
tenacity 8.2.3 pypi_0 pypi
tifffile 2023.8.12 pypi_0 pypi
timm 0.6.13 pypi_0 pypi
tk 8.6.12 h8ffe710_0 conda-forge
tokenizers 0.13.3 pypi_0 pypi
tomli 2.0.1 pypi_0 pypi
torch 1.12.1+cu116 pypi_0 pypi
torch-efficient-distloss 0.1.3 pypi_0 pypi
torch-scatter 2.0.9 pypi_0 pypi
torchaudio 0.12.1+cu116 pypi_0 pypi
torchvision 0.13.1+cu116 pypi_0 pypi
tqdm 4.64.1 pypi_0 pypi
transformers 4.29.1 pypi_0 pypi
typing-extensions 4.4.0 pypi_0 pypi
tzdata 2023c h71feb2d_0 conda-forge
ucrt 10.0.22621.0 h57928b3_0 conda-forge
urllib3 1.26.13 pypi_0 pypi
vc 14.3 h64f974e_17 conda-forge
vc14_runtime 14.36.32532 hfdfe4a8_17 conda-forge
vs2015_runtime 14.36.32532 h05e6639_17 conda-forge
werkzeug 2.3.7 pypi_0 pypi
wheel 0.41.1 pyhd8ed1ab_0 conda-forge
xz 5.2.6 h8d14728_0 conda-forge
yapf 0.32.0 pypi_0 pypi
zipp 3.16.2 pypi_0 pypi

My CUDA version: 11.6 (originally I had 12.0, but I had to downgrade to 11.6 to match the torch version for this project)

Any solution?

get the raw result

Hi, Thanks for your work!

I have one question: How can I get the volumetric segmentation result(R, G, B, Sigma) from the program? Do you have some pre-train results for that? And I had the same problem which is pretty similar to this issue #24

Application of this work

Hi,

Thanks for this great work.

I have one question. What do you think is the best application of this study? Since it still requires human prompt input, I was curious about its advantage over other fully automatic 3D representation models.

Running on remote server

Hi

Thanks for the useful code.

Can it be possible to run without gui as I am running on linux remote server. I guess it cannot have a gui there.

Thanks a lot.

how to segment everything and generate segmentation for Multi-objects

It's a really great approach created by you guys to create the 3D segments. I run it on few objects and it's giving really good segmentation. But I have few questions:

How can I do the parts segmentation of the object. Let's take an example of horns, I want both horn to be as different masks. i.e segmenting as multi-objects.
I tried to use --segment everything flag in this way:

python run_seg_gui.py --config=configs/llff/seg/seg_horns.py --segment_everything --sp_name=_gui --num_prompts=20 --render_opt=train --save_ckpt

So, that I can create different mask for each part of the object. But it resulted in loading the same old gui. Any suggestion how can I do it?

Any help would be really appreciable.

Code release

Thanks for the great work! Do you have an ETA on when the code would be released?

Failed to build torch_scatter and Grounding-Dino

Docker images: 11.3.1-cudnn8-devel-ubuntu20.04

use pip3 install -r requirements.txt

while building torch_scatter, first error occurs: No module named torch.

then I choose to manually install torch==1.12.1。and delete torch_scatter's version forcement in requirements and go on.

another error occurs, torch_scatter throw The detected CUDA version (11.3) mismatches the version that was used to compile PyTorch (10.2). Please make sure to use the same CUDA versions.

the same error occurs while build Grounding Dino as below:


ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/NeRF/SegmentAnythingin3D/dependencies/sam_ckpt/GroundingDINO/setup.py'"'"'; file='"'"'/NeRF/SegmentAnythingin3D/dependencies/sam_ckpt/GroundingDINO/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps
cwd: /NeRF/SegmentAnythingin3D/dependencies/sam_ckpt/GroundingDINO/
Complete output (56 lines):
Building wheel groundingdino-0.1.0
Compiling with CUDA
running develop
running egg_info
writing groundingdino.egg-info/PKG-INFO
writing dependency_links to groundingdino.egg-info/dependency_links.txt
writing requirements to groundingdino.egg-info/requires.txt
writing top-level names to groundingdino.egg-info/top_level.txt
reading manifest file 'groundingdino.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'groundingdino.egg-info/SOURCES.txt'
running build_ext
/usr/local/lib/python3.8/dist-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/usr/local/lib/python3.8/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/usr/local/lib/python3.8/dist-packages/torch/utils/cpp_extension.py:411: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
warnings.warn(msg.format('we could not find ninja.'))
Traceback (most recent call last):
File "", line 1, in
File "/NeRF/SegmentAnythingin3D/dependencies/sam_ckpt/GroundingDINO/setup.py", line 192, in
setup(
File "/usr/local/lib/python3.8/dist-packages/setuptools/init.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.8/dist-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/usr/local/lib/python3.8/dist-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/usr/local/lib/python3.8/dist-packages/setuptools/_distutils/dist.py", line 973, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.8/dist-packages/setuptools/dist.py", line 1217, in run_command
super().run_command(command)
File "/usr/local/lib/python3.8/dist-packages/setuptools/_distutils/dist.py", line 992, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.8/dist-packages/setuptools/command/develop.py", line 34, in run
self.install_for_development()
File "/usr/local/lib/python3.8/dist-packages/setuptools/command/develop.py", line 114, in install_for_development
self.run_command('build_ext')
File "/usr/local/lib/python3.8/dist-packages/setuptools/_distutils/cmd.py", line 319, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.8/dist-packages/setuptools/dist.py", line 1217, in run_command
super().run_command(command)
File "/usr/local/lib/python3.8/dist-packages/setuptools/_distutils/dist.py", line 992, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.8/dist-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/usr/local/lib/python3.8/dist-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
self.build_extensions()
File "/usr/local/lib/python3.8/dist-packages/torch/utils/cpp_extension.py", line 434, in build_extensions
self._check_cuda_version(compiler_name, compiler_version)
File "/usr/local/lib/python3.8/dist-packages/torch/utils/cpp_extension.py", line 812, in _check_cuda_version
raise RuntimeError(CUDA_MISMATCH_MESSAGE.format(cuda_str_version, torch.version.cuda))
RuntimeError:
The detected CUDA version (11.3) mismatches the version that was used to compile
PyTorch (10.2). Please make sure to use the same CUDA versions.

----------------------------------------

ERROR: Command errored out with exit status 1: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/NeRF/SegmentAnythingin3D/dependencies/sam_ckpt/GroundingDINO/setup.py'"'"'; file='"'"'/NeRF/SegmentAnythingin3D/dependencies/sam_ckpt/GroundingDINO/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output

——————————————————————————————————————————————
which cuda version do I need to build this work?

Without the GUI

Hi, thank you very much for your great work!

Can you provide the code for segmentation without the GUI? Because I want to learn more intuitively how the code for segmentation is used.

Trouble with running SA3D with GUI

I am trying to run SA3D with GUI. I have completed the installation and finished training NeRF. However, when I run the command to run with GUI :

python run_seg_gui.py --config=configs/llff/seg/seg_fern.py --segment --sp_name=_gui --num_prompts=20 --render_opt=train --save_ckpt

I am able to begin the training before I start getting this error in the sam3d.py file:

self.sam = sam_model_registry[model_type](checkpoint=sam_checkpoint).to(device)
UnboundLocalError: local variable 'sam_model_registry' referenced before assignment

Has anyone come across this issue? I have double-checked with the installation process and I'm sure I have completed every step.

Thanks.

Details of the Experiment on Replica Dataset for Reproducing Results in Paper

Hi, thanks for your impressive and effective work!
I wonder would you like to provide more details about the evaluation on Replica Dataset? Specifically, I have the following questions:

  1. You choose one reference view for each object, would you please release the reference view ID for us to reproduce the results?
  2. For training, did you use both sequence 1 and 2 in the Replica dataset or sequence 1 only? From your dataloader, the step size is set as 5. What about the step size for evaluation?
  3. There are many objects in the dataset that occupy only a small fraction of the pixels in some images, which may cause low IoU results. Did you use some filter scheme to suppress this problem? (eg. if pixnum($obj_i$ in $img_j$) < 100, then exclude the $img_j$ from the evaluation procedure of $obj_i$)

Nerfstudio version

Thank you for your great work.

I have several questions regarding your project:

  1. Is there any way to use nerfstudio to render 2D mask based on training images accordingly?
  2. From my result shown in the uploaded video, I ask the model to segment the "conference table" based on the "room" LLFF dataset, but the segmentation result of some views are not good, is there any reason causing it?
video.seg_on_rgb_gui_seg_img.mp4

Can it be Nerf agnostic?

Hello hello

This looks amazing and very exciting, thank your for your work!

Question: Can it be agnostic of Nerf? Im particularly interested by the "3D mask grids via density-guided inverse rendering" technique, Im wondering if a set of 2D masks produced by SAM for a given object could output an assessment in 3D space regardless of Nerf (e.g a bounding box. or a serie of points)

Hope that makes sense, thanks!

Failed to build Grounding-Dino

Run the pip install -e .
The following problems occur.
Looking in indexes: https://mirrors.aliyun.com/pypi/simple
Obtaining file:///G:/SegmentAnythingin3D/GroundingDINO
Preparing metadata (setup.py) ... done
Requirement already satisfied: torch in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from groundingdino==0.1.0) (1.12.1)
Requirement already satisfied: torchvision in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from groundingdino==0.1.0) (0.13.1)
Requirement already satisfied: transformers in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from groundingdino==0.1.0) (4.29.1)
Requirement already satisfied: addict in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from groundingdino==0.1.0) (2.4.0)
Requirement already satisfied: yapf in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from groundingdino==0.1.0) (0.32.0)
Requirement already satisfied: timm in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from groundingdino==0.1.0) (0.6.13)
Requirement already satisfied: numpy in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from groundingdino==0.1.0) (1.26.3)
Requirement already satisfied: opencv-python in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from groundingdino==0.1.0) (4.6.0.66)
Requirement already satisfied: supervision in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from groundingdino==0.1.0) (0.6.0)
Requirement already satisfied: pycocotools in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from groundingdino==0.1.0) (2.0.5)
Requirement already satisfied: matplotlib>=2.1.0 in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from pycocotools->groundingdino==0.1.0) (3.8.2)
Requirement already satisfied: pyyaml in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from timm->groundingdino==0.1.0) (6.0)
Requirement already satisfied: huggingface-hub in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from timm->groundingdino==0.1.0) (0.14.1)
Requirement already satisfied: typing_extensions in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from torch->groundingdino==0.1.0) (4.9.0)
Requirement already satisfied: requests in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from torchvision->groundingdino==0.1.0) (2.31.0)
Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from torchvision->groundingdino==0.1.0) (9.2.0)
Requirement already satisfied: filelock in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from transformers->groundingdino==0.1.0) (3.13.1)
Requirement already satisfied: packaging>=20.0 in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from transformers->groundingdino==0.1.0) (23.2)
Requirement already satisfied: regex!=2019.12.17 in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from transformers->groundingdino==0.1.0) (2023.12.25)
Requirement already satisfied: tokenizers!=0.11.3,<0.14,>=0.11.1 in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from transformers->groundingdino==0.1.0) (0.13.3)
Requirement already satisfied: tqdm>=4.27 in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from transformers->groundingdino==0.1.0) (4.64.1)
Requirement already satisfied: fsspec in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from huggingface-hub->timm->groundingdino==0.1.0) (2023.12.2)
Requirement already satisfied: contourpy>=1.0.1 in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from matplotlib>=2.1.0->pycocotools->groundingdino==0.1.0) (1.2.0)
Requirement already satisfied: cycler>=0.10 in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from matplotlib>=2.1.0->pycocotools->groundingdino==0.1.0) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from matplotlib>=2.1.0->pycocotools->groundingdino==0.1.0) (4.47.0
)
Requirement already satisfied: kiwisolver>=1.3.1 in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from matplotlib>=2.1.0->pycocotools->groundingdino==0.1.0) (1.4.5)
Requirement already satisfied: pyparsing>=2.3.1 in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from matplotlib>=2.1.0->pycocotools->groundingdino==0.1.0) (3.1.1)
Requirement already satisfied: python-dateutil>=2.7 in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from matplotlib>=2.1.0->pycocotools->groundingdino==0.1.0) (2.8
.2)
Requirement already satisfied: colorama in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from tqdm>=4.27->transformers->groundingdino==0.1.0) (0.4.6)
Requirement already satisfied: charset-normalizer<4,>=2 in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from requests->torchvision->groundingdino==0.1.0) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from requests->torchvision->groundingdino==0.1.0) (3.6)
Requirement already satisfied: urllib3<3,>=1.21.1 in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from requests->torchvision->groundingdino==0.1.0) (2.1.0)
Requirement already satisfied: certifi>=2017.4.17 in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from requests->torchvision->groundingdino==0.1.0) (2023.11.17)
Requirement already satisfied: six>=1.5 in d:\anaconda3\envs\segmentanythingin3d\lib\site-packages (from python-dateutil>=2.7->matplotlib>=2.1.0->pycocotools->groundingdino==0
.1.0) (1.16.0)
Installing collected packages: groundingdino
Running setup.py develop for groundingdino
error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [48 lines of output]
Building wheel groundingdino-0.1.0
Compiling with CUDA
running develop
D:\Anaconda3\envs\SegmentAnythingin3D\lib\site-packages\setuptools\command\develop.py:40: 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.
        ********************************************************************************

!!
  easy_install.initialize_options(self)
D:\Anaconda3\envs\SegmentAnythingin3D\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()
running egg_info
writing groundingdino.egg-info\PKG-INFO
writing dependency_links to groundingdino.egg-info\dependency_links.txt
writing requirements to groundingdino.egg-info\requires.txt
writing top-level names to groundingdino.egg-info\top_level.txt
reading manifest file 'groundingdino.egg-info\SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'groundingdino.egg-info\SOURCES.txt'
running build_ext
D:\Anaconda3\envs\SegmentAnythingin3D\lib\site-packages\torch\utils\cpp_extension.py:813: UserWarning: The detected CUDA version (11.6) has a minor version mismatch wi

th the version that was used to compile PyTorch (11.3). Most likely this shouldn't be a problem.
warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
building 'groundingdino._C' extension
Emitting ninja build file G:\SegmentAnythingin3D\GroundingDINO\build\temp.win-amd64-cpython-310\Release\build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
1.10.2
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\HostX86\x64\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /M
ANIFESTUAC:NO /LIBPATH:D:\Anaconda3\envs\SegmentAnythingin3D\lib\site-packages\torch\lib "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\lib/x64" /LIBPATH:D
:\Anaconda3\envs\SegmentAnythingin3D\libs /LIBPATH:D:\Anaconda3\envs\SegmentAnythingin3D /LIBPATH:D:\Anaconda3\envs\SegmentAnythingin3D\PCbuild\amd64 "/LIBPATH:C:\Program File
s\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130
lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64" "/LIBPATH:D:\Windows Kits\10\lib\10.0.22621.0\ucrt\x64" "/LIBPATH:D:\Windows Kits\10\lib\10.0.
22621.0\um\x64" c10.lib torch.lib torch_cpu.lib torch_python.lib cudart.lib c10_cuda.lib torch_cuda_cu.lib torch_cuda_cpp.lib /EXPORT:PyInit__C G:\SegmentAnythingin3D\Groundi
ngDINO\build\temp.win-amd64-cpython-310\Release\SegmentAnythingin3D\GroundingDINO\groundingdino\models\GroundingDINO\csrc\MsDeformAttn\ms_deform_attn_cpu.obj G:\SegmentAnythin
gin3D\GroundingDINO\build\temp.win-amd64-cpython-310\Release\SegmentAnythingin3D\GroundingDINO\groundingdino\models\GroundingDINO\csrc\MsDeformAttn\ms_deform_attn_cuda.obj G:
SegmentAnythingin3D\GroundingDINO\build\temp.win-amd64-cpython-310\Release\SegmentAnythingin3D\GroundingDINO\groundingdino\models\GroundingDINO\csrc\cuda_version.obj G:\Segmen
tAnythingin3D\GroundingDINO\build\temp.win-amd64-cpython-310\Release\SegmentAnythingin3D\GroundingDINO\groundingdino\models\GroundingDINO\csrc\vision.obj /OUT:build\lib.win-am
d64-cpython-310\groundingdino_C.cp310-win_amd64.pyd /IMPLIB:G:\SegmentAnythingin3D\GroundingDINO\build\temp.win-amd64-cpython-310\Release\SegmentAnythingin3D\GroundingDINO\gr
oundingdino\models\GroundingDINO\csrc\MsDeformAttn_C.cp310-win_amd64.lib
LINK : fatal error LNK1181: 无法打开输入文件“G:\SegmentAnythingin3D\GroundingDINO\build\temp.win-amd64-cpython-310\Release\SegmentAnythingin3D\GroundingDINO\groundingd
ino\models\GroundingDINO\csrc\MsDeformAttn\ms_deform_attn_cpu.obj”
error: command 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\HostX86\x64\link.exe' failed with exit code 1181
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [48 lines of output]
Building wheel groundingdino-0.1.0
Compiling with CUDA
running develop
D:\Anaconda3\envs\SegmentAnythingin3D\lib\site-packages\setuptools\command\develop.py:40: 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.
    ********************************************************************************

!!
easy_install.initialize_options(self)
D:\Anaconda3\envs\SegmentAnythingin3D\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()
running egg_info
writing groundingdino.egg-info\PKG-INFO
writing dependency_links to groundingdino.egg-info\dependency_links.txt
writing requirements to groundingdino.egg-info\requires.txt
writing top-level names to groundingdino.egg-info\top_level.txt
reading manifest file 'groundingdino.egg-info\SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'groundingdino.egg-info\SOURCES.txt'
running build_ext
D:\Anaconda3\envs\SegmentAnythingin3D\lib\site-packages\torch\utils\cpp_extension.py:813: UserWarning: The detected CUDA version (11.6) has a minor version mismatch with t
he version that was used to compile PyTorch (11.3). Most likely this shouldn't be a problem.
warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
building 'groundingdino._C' extension
Emitting ninja build file G:\SegmentAnythingin3D\GroundingDINO\build\temp.win-amd64-cpython-310\Release\build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
1.10.2
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\HostX86\x64\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIF
ESTUAC:NO /LIBPATH:D:\Anaconda3\envs\SegmentAnythingin3D\lib\site-packages\torch\lib "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\lib/x64" /LIBPATH:D:\An
aconda3\envs\SegmentAnythingin3D\libs /LIBPATH:D:\Anaconda3\envs\SegmentAnythingin3D /LIBPATH:D:\Anaconda3\envs\SegmentAnythingin3D\PCbuild\amd64 "/LIBPATH:C:\Program Files\Mi
crosoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\lib
x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64" "/LIBPATH:D:\Windows Kits\10\lib\10.0.22621.0\ucrt\x64" "/LIBPATH:D:\Windows Kits\10\lib\10.0.2262
1.0\um\x64" c10.lib torch.lib torch_cpu.lib torch_python.lib cudart.lib c10_cuda.lib torch_cuda_cu.lib torch_cuda_cpp.lib /EXPORT:PyInit__C G:\SegmentAnythingin3D\GroundingDI
NO\build\temp.win-amd64-cpython-310\Release\SegmentAnythingin3D\GroundingDINO\groundingdino\models\GroundingDINO\csrc\MsDeformAttn\ms_deform_attn_cpu.obj G:\SegmentAnythingin3
D\GroundingDINO\build\temp.win-amd64-cpython-310\Release\SegmentAnythingin3D\GroundingDINO\groundingdino\models\GroundingDINO\csrc\MsDeformAttn\ms_deform_attn_cuda.obj G:\Segm
entAnythingin3D\GroundingDINO\build\temp.win-amd64-cpython-310\Release\SegmentAnythingin3D\GroundingDINO\groundingdino\models\GroundingDINO\csrc\cuda_version.obj G:\SegmentAny
thingin3D\GroundingDINO\build\temp.win-amd64-cpython-310\Release\SegmentAnythingin3D\GroundingDINO\groundingdino\models\GroundingDINO\csrc\vision.obj /OUT:build\lib.win-amd64-
cpython-310\groundingdino_C.cp310-win_amd64.pyd /IMPLIB:G:\SegmentAnythingin3D\GroundingDINO\build\temp.win-amd64-cpython-310\Release\SegmentAnythingin3D\GroundingDINO\ground
ingdino\models\GroundingDINO\csrc\MsDeformAttn_C.cp310-win_amd64.lib
LINK : fatal error LNK1181: 无法打开输入文件“G:\SegmentAnythingin3D\GroundingDINO\build\temp.win-amd64-cpython-310\Release\SegmentAnythingin3D\GroundingDINO\groundingdino
models\GroundingDINO\csrc\MsDeformAttn\ms_deform_attn_cpu.obj”
error: command 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\HostX86\x64\link.exe' failed with exit code 1181
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

I use windows system, the environment is as follows

Name Version
addict==2.4.0
blas==1.0
blas-devel==3.9.0
blinker==1.7.0
brotli-python==1.0.9
bzip2==1.0.8
ca-certificates==2023.12.12
certifi==2023.11.17
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
contourpy==1.2.0
cudatoolkit==11.3.1
cycler==0.12.1
dash==2.6.2
dash-core-components==2.0.0
dash-html-components==2.0.0
dash-table==5.0.0
filelock==3.13.1
flask==3.0.0
flask-compress==1.14
fonttools==4.47.0
freetype==2.10.4
fsspec==2023.12.2
huggingface-hub==0.14.1
idna==3.6
imageio==2.22.2
intel-openmp==2023.2.0
itsdangerous==2.1.2
jinja2==3.1.2
jpeg==9e
kiwisolver==1.4.5
libblas==3.9.0
libcblas==3.9.0
libffi==3.4.4
liblapack==3.9.0
liblapacke==3.9.0
libpng==1.6.37
libtiff==4.0.9
libuv==1.44.2
libwebp==1.2.4
libwebp-base==1.2.4
lpips==0.1.4
m2w64-gcc-libgfortran==5.3.0
m2w64-gcc-libs==5.3.0
m2w64-gcc-libs-core==5.3.0
m2w64-gmp==6.1.0
m2w64-libwinpthread-git==5.0.0.4634.697f757
markupsafe==2.1.3
matplotlib==3.8.2
mkl==2023.2.0
mkl-devel==2023.2.0
mkl-include==2023.2.0
mkl-service==2.4.0
mkl_fft==1.3.8
mkl_random==1.2.4
msys2-conda-epoch 20160418
networkx==3.2.1
numpy==1.26.3
numpy-base==1.26.3
opencv-python==4.6.0.66
openssl==3.0.12
packaging==23.2
pillow==9.2.0
pip==23.3.1
plotly==5.10.0
pycocotools==2.0.5
pyparsing==3.1.1
pysocks==1.7.1
python==3.10.13
python-dateutil==2.8.2
python_abi==3.10
pytorch==1.12.1
pytorch-mutex==1.0
pywavelets==1.5.0
pyyaml==6.0
regex==2023.12.25
requests==2.31.0
scikit-image==0.19.3
scipy==1.10.0
segment-anything==1.0
setuptools==63.4.1
six==1.16.0
sqlite==3.41.2
supervision==0.6.0
tbb==2021.5.0
tenacity==8.2.3
tifffile==2023.12.9
timm==0.6.13
tk==8.6.12
tokenizers==0.13.3
torch-efficient-distloss==0.1.3
torch-scatter==2.0.9
torchaudio==0.12.1
torchvision==0.13.1
tqdm==4.64.1
transformers==4.29.1
typing_extensions==4.9.0
tzdata 2023d
urllib3==2.1.0
vc==14.2
vs2015_runtime 14.27.29016
werkzeug==3.0.1
wheel==0.41.2
win_inet_pton==1.1.0
xz==5.4.5
yapf==0.32.0
zlib==1.2.13

Does anyone have this problem? How to solve this problem?

About the results on Replica dataset

Thanks for the great work!

I noticed that only mipnerf360, LLFF, LERF datasets are available. Will the Replica dataset be available?

BTW, I noticed that there is a load_replica.py file, is the data processing code of this file usable?

Seg Faulting and Core Dumps when trying to run on remote server

Hello, I am trying to run SA3D on a remote server using the given examples but every command causes a seg fault or core dump after installing everything in the repo.

Example:
python run_seg_gui.py --config=configs/llff/seg/seg_fern.py --segment --sp_name=_gui --num_prompts=20 --render_opt=train --save_ckpt
Segmentation fault (core dumped)

Is there a remedy for this or is it a limitation of a remote server because of the gui or something else?

Evaluation on NVOS

Hi, thank you for your amazing work. Could you add elaborate on how you load and test the NVOS dataset?

NVOS dataset itself uses the undistort version of LLFF (see README.MD on their dataset) from here. I'm not sure whether I need to train the NeRF models on that undistort LLFF dataset, or maybe can I just use the LLFF dataset directly and use only the masks and scribbles from NVOS?

Also, do you plan to add your codes on how you evaluate those masks and scribbles? Even better if you plan to add your evaluation code such as your metric calculation (mIoU and Acc)!
I would greatly appreciate it!

Code release

I'm starving. It's already the last day of May.
I'm looking forward to your masterpiece.
I'm thirsty for the your code.

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.