Encountered illegal memory access issues when running merge_patches
(trace3d) surpolo@cyPC:~/3Dreconstruction/Trace3D/script$ (trace3d) surpolo@cyPC:~/3Dreconstruction/Trace3D/script$ bash replica.sh merge_patches
当前工作目录: /home/surpolo/3Dreconstruction/Trace3D
Looking for config file in ./output/Bean0915-1300/cfg_args
Config file found: ./output/Bean0915-1300/cfg_args
Loading trained model at iteration 30000
/home/surpolo/3Dreconstruction/Trace3D/data/Bean0915-1300
Reading camera 82/82read 0 sam masks
Loading Training Cameras
[ INFO ] Encountered quite large input images (>1.6K pixels width), rescaling to 1.6K.
If this is not desired, please explicitly specify '--resolution/-r' as 1
Loading Test Cameras
Found 82 SAM mask files.
82it [00:03, 22.73it/s]
Traceback (most recent call last):
File "/home/surpolo/3Dreconstruction/Trace3D/merge_patches.py", line 180, in TORCH_USE_CUDA_DSA to enable device-side assertions.
The known difference from the installation operation is that I used pip install --no-build-isolation -r requirements.txt, because I encountered an issue with torch when installing submodules.
issue with torch when installing submodules, while i've installed torch with cuda:
Traceback (most recent call last):
File "/home/surpolo/anaconda3/envs/trace3d/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in
Notice that your log shows:
Loading Training Cameras
[ INFO ] Encountered quite large input images (>1.6K pixels width), rescaling to 1.6K.
This means the input images are automatically downscaled to 1600px width during loading. However, your SAM masks were generated using the original high-resolution images, so their shapes no longer match after the auto-rescaling. To avoid this mismatch, you should rescale the images before generating SAM masks.
I will try it.Thx! ---- Replied Message ---- From沈洪宇(hongyu @.>Date11/27/2025 12:51 @.> CcChen @.>, @.>SubjectRe: [trace-3d/Trace3D] Encountered illegal memory access issues when running merge_patches (Issue #5) shy2000 left a comment (trace-3d/Trace3D#5) Notice that your log shows: Loading Training Cameras [ INFO ] Encountered quite large input images (>1.6K pixels width), rescaling to 1.6K. This means the input images are automatically downscaled to 1600px width during loading. However, your SAM masks were generated using the original high-resolution images, so their shapes no longer match after the auto-rescaling. To avoid this mismatch, you should rescale the images before generating SAM masks. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>