Preprocess Error
Neal2020GitHub opened this issue · 3 comments
Neal2020GitHub commented
Hi, I encountered such error when I ran preprocess.py
. Any idea how to solve it? Thank you!
(langsplat) ➜ LangSplat git:(main) ✗ python preprocess.py --dataset_path ./data/snacks
[ INFO ] Encountered quite large input images (>1080P), rescaling to 1080P.
If this is not desired, please explicitly specify '--resolution/-r' as 1
Traceback (most recent call last):
File "preprocess.py", line 126, in create
img_embed, seg_map = _embed_clip_sam_tiles(img.unsqueeze(0), sam_encoder)
File "preprocess.py", line 178, in _embed_clip_sam_tiles
seg_images, seg_map = sam_encoder(aug_imgs)
File "preprocess.py", line 299, in sam_encoder
masks_default, masks_s, masks_m, masks_l = mask_generator.generate(image)
ValueError: too many values to unpack (expected 4)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "preprocess.py", line 404, in <module>
create(imgs, data_list, save_folder)
File "preprocess.py", line 128, in create
raise ValueError(timer)
ValueError: 1
Neal2020GitHub commented
maybeLx commented
I also have the same problem
maybeLx commented
I have solved the problem, this is due to the reason that you have installed segment-anything before in your environment, you need to uninstall the segment-anything, and follow the README to install the segment-anything-langsplat author has provided. Then you can successfully run the code