Open vicadmo opened 7 months ago
never seen this. You can increase the debug to 3 and dump more files for viz.
Hi, I tried in docker as well and i got the same error so i think it might have something to do with how the gpu works with wsl since i got some erros on the wsl logs pointing towards that. In your experience do you think this could be run on a 1660 ti gpu? And another question i have is if i have to use cuda 11.8 or i can use the most recent version. Thanks in advance and sorry for the trouble and multiple questions!
are you running on our example data or your own?
The example data. I tried both the mustard and the driller examples and got the same result. I am quite new to this so maybe i missed some obvious step that may be causing this. I tried to see exactly where the error migth be and i saw that the result of rasterizing when predicting the pose was all 0s.
rast_out, _ = dr.rasterize(glctx, pos_clip, pos_idx, resolution=np.asarray(output_size))
The inputs seemed fine thats why i thougth that maybe there was a problem with something not running properly on the gpu on my end. If you want i can give the detailed values.
Hello, i experience the same problem with both objects. I changed variable debug to 3 but nothing happened.
/home/evdotheo/Desktop/OPTIMAI/FoundationPose/Utils.py:727:` RuntimeWarning: invalid value encountered in cast uv = np.round(projected[:,:2]/projected[:,2].reshape(-1,1)).astype(int) #(2,2) Traceback (most recent call last): File "/home/evdotheo/Desktop/OPTIMAI/FoundationPose/run_demo.py", line 70, in
vis = draw_posed_3d_box(reader.K, img=color, ob_in_cam=center_pose, bbox=bbox) File "/home/evdotheo/Desktop/OPTIMAI/FoundationPose/Utils.py", line 735, in draw_posed_3d_box img = draw_line3d(start,end,img) File "/home/evdotheo/Desktop/OPTIMAI/FoundationPose/Utils.py", line 728, in draw_line3d img = cv2.line(img, uv[0].tolist(), uv[1].tolist(), color=line_color, thickness=linewidth, lineType=cv2.LINE_AA) cv2.error: OpenCV(4.9.0) :-1: error: (-5:Bad argument) in function 'line'
`
Overload resolution failed:
- Can't parse 'pt1'. Sequence item with index 0 has a wrong type
- Can't parse 'pt1'. Sequence item with index 0 has a wrong type `
@EvdoTheo Hi, can you please share your syslog at var/log/syslog to see if you are getting a similar message to me in the linux logs? Thanks in advance
The example data. I tried both the mustard and the driller examples and got the same result. I am quite new to this so maybe i missed some obvious step that may be causing this. I tried to see exactly where the error migth be and i saw that the result of rasterizing when predicting the pose was all 0s.
rast_out, _ = dr.rasterize(glctx, pos_clip, pos_idx, resolution=np.asarray(output_size))
The inputs seemed fine thats why i thougth that maybe there was a problem with something not running properly on the gpu on my end. If you want i can give the detailed values.
what is the GPU you are using?
1660 ti on a laptop
That GPU might have caused the issue. Do you have 1080 TI, 2080 Ti, 3080 Ti, etc?
No, unfortunately the 1660 ti is the only one i have.
@vicadmo Were you able to fix it? Even with my 1650, I am having the same issue
today, i also encounter the same error.
/home/admin206/anaconda3/envs/foundationpose/bin/python /home/admin206/FoundationPose-main/run_demo.py
Warp 1.0.2 initialized:
CUDA Toolkit 11.5, Driver 12.2
Devices:
"cpu" : "x86_64"
"cuda:0" : "NVIDIA GeForce GTX 1660 SUPER" (6 GiB, sm_75, mempool enabled)
Kernel cache:
/home/admin206/.cache/warp/1.0.2
[__init__()] self.cfg:
lr: 0.0001
c_in: 6
zfar: 'Infinity'
debug: null
n_view: 1
run_id: 3wy8qqex
use_BN: true
exp_name: 2024-01-11-20-02-45
n_epochs: 62
save_dir: /home/bowenw/debug/2024-01-11-20-02-45/
use_mask: false
loss_type: pairwise_valid
optimizer: adam
batch_size: 64
crop_ratio: 1.1
enable_amp: true
use_normal: false
max_num_key: null
warmup_step: -1
input_resize:
- 160
- 160
max_step_val: 1000
vis_interval: 1000
weight_decay: 0
normalize_xyz: true
resume_run_id: null
clip_grad_norm: 'Infinity'
lr_epoch_decay: 500
render_backend: nvdiffrast
train_num_pair: 5
lr_decay_epochs:
- 50
n_epochs_warmup: 1
make_pair_online: false
gradient_max_norm: 'Infinity'
max_step_per_epoch: 10000
n_rendering_workers: 1
save_epoch_interval: 100
n_dataloader_workers: 100
split_objects_across_gpus: true
ckpt_dir: /home/admin206/FoundationPose-main/learning/training/../../weights/2024-01-11-20-02-45/model_best.pth
[__init__()] self.h5_file:None
[__init__()] Using pretrained model from /home/admin206/FoundationPose-main/learning/training/../../weights/2024-01-11-20-02-45/model_best.pth
[__init__()] init done
[__init__()] welcome
[__init__()] self.cfg:
lr: 0.0001
c_in: 6
zfar: .inf
debug: null
w_rot: 0.1
n_view: 1
run_id: null
use_BN: true
rot_rep: axis_angle
ckpt_dir: /home/admin206/FoundationPose-main/learning/training/../../weights/2023-10-28-18-33-37/model_best.pth
exp_name: 2023-10-28-18-33-37
save_dir: /tmp/2023-10-28-18-33-37/
loss_type: l2
optimizer: adam
trans_rep: tracknet
batch_size: 64
crop_ratio: 1.2
use_normal: false
BN_momentum: 0.1
max_num_key: null
warmup_step: -1
input_resize:
- 160
- 160
max_step_val: 1000
normal_uint8: false
vis_interval: 1000
weight_decay: 0
n_max_objects: null
normalize_xyz: true
clip_grad_norm: 'Infinity'
rot_normalizer: 0.3490658503988659
trans_normalizer:
- 0.019999999552965164
- 0.019999999552965164
- 0.05000000074505806
max_step_per_epoch: 25000
val_epoch_interval: 10
n_dataloader_workers: 60
enable_amp: true
use_mask: false
[__init__()] self.h5_file:
[__init__()] Using pretrained model from /home/admin206/FoundationPose-main/learning/training/../../weights/2023-10-28-18-33-37/model_best.pth
[__init__()] init done
[reset_object()] self.diameter:0.19646325799497472, vox_size:0.009823162899748735
[reset_object()] self.pts:torch.Size([607, 3])
[reset_object()] reset done
[make_rotation_grid()] cam_in_obs:(42, 4, 4)
[make_rotation_grid()] rot_grid:(252, 4, 4)
[make_rotation_grid()] after cluster, rot_grid:(252, 4, 4)
[make_rotation_grid()] self.rot_grid: torch.Size([252, 4, 4])
[<module>()] estimator initialization done
[<module>()] i:0
num original candidates = 252
num of pose after clustering: 252
[register()] Welcome
Module Utils load on device 'cuda:0' took 5.82 ms
[register()] poses:(252, 4, 4)
[register()] after viewpoint, add_errs min:-1.0
[predict()] ob_in_cams:(252, 4, 4)
[predict()] self.cfg.use_normal:False
[predict()] trans_normalizer:[0.019999999552965164, 0.019999999552965164, 0.05000000074505806], rot_normalizer:0.3490658503988659
[predict()] making cropped data
[make_crop_data_batch()] Welcome make_crop_data_batch
[make_crop_data_batch()] make tf_to_crops done
[make_crop_data_batch()] render done
[make_crop_data_batch()] warp done
[make_crop_data_batch()] pose batch data done
[predict()] forward start
[predict()] forward done
[predict()] making cropped data
[make_crop_data_batch()] Welcome make_crop_data_batch
[make_crop_data_batch()] make tf_to_crops done
[make_crop_data_batch()] render done
[make_crop_data_batch()] warp done
[make_crop_data_batch()] pose batch data done
[predict()] forward start
[predict()] forward done
[predict()] making cropped data
[make_crop_data_batch()] Welcome make_crop_data_batch
[make_crop_data_batch()] make tf_to_crops done
[make_crop_data_batch()] render done
[make_crop_data_batch()] warp done
[make_crop_data_batch()] pose batch data done
[predict()] forward start
[predict()] forward done
[predict()] making cropped data
[make_crop_data_batch()] Welcome make_crop_data_batch
[make_crop_data_batch()] make tf_to_crops done
[make_crop_data_batch()] render done
[make_crop_data_batch()] warp done
[make_crop_data_batch()] pose batch data done
[predict()] forward start
[predict()] forward done
[predict()] making cropped data
[make_crop_data_batch()] Welcome make_crop_data_batch
[make_crop_data_batch()] make tf_to_crops done
[make_crop_data_batch()] render done
[make_crop_data_batch()] warp done
[make_crop_data_batch()] pose batch data done
[predict()] forward start
[predict()] forward done
[predict()] get_vis...
[make_crop_data_batch()] Welcome make_crop_data_batch
[make_crop_data_batch()] make tf_to_crops done
[make_crop_data_batch()] render done
[make_crop_data_batch()] warp done
[make_crop_data_batch()] pose batch data done
[make_crop_data_batch()] Welcome make_crop_data_batch
[make_crop_data_batch()] make tf_to_crops done
[make_crop_data_batch()] render done
[make_crop_data_batch()] warp done
[make_crop_data_batch()] pose batch data done
/home/admin206/FoundationPose-main/Utils.py:469: RuntimeWarning: invalid value encountered in divide
vis = (depth-zmin)/(zmax-zmin)
[predict()] ob_in_cams:(252, 4, 4)
[predict()] self.cfg.use_normal:False
[predict()] making cropped data
[make_crop_data_batch()] Welcome make_crop_data_batch
[make_crop_data_batch()] make tf_to_crops done
[make_crop_data_batch()] render done
[make_crop_data_batch()] pose batch data done
[find_best_among_pairs()] pose_data.rgbAs.shape[0]: 252
[predict()] forward done
[predict()] get_vis...
[register()] final, add_errs min:-1.0
[register()] sort ids:tensor([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195,
196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251])
[register()] sorted scores:tensor([nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,
nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,
nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,
nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,
nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,
nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,
nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,
nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,
nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,
nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,
nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan])
/home/admin206/FoundationPose-main/Utils.py:727: RuntimeWarning: invalid value encountered in cast
uv = np.round(projected[:,:2]/projected[:,2].reshape(-1,1)).astype(int) #(2,2)
Traceback (most recent call last):
File "/home/admin206/FoundationPose-main/run_demo.py", line 70, in <module>
vis = draw_posed_3d_box(reader.K, img=color, ob_in_cam=center_pose, bbox=bbox)
File "/home/admin206/FoundationPose-main/Utils.py", line 735, in draw_posed_3d_box
img = draw_line3d(start,end,img)
File "/home/admin206/FoundationPose-main/Utils.py", line 728, in draw_line3d
img = cv2.line(img, uv[0].tolist(), uv[1].tolist(), color=line_color, thickness=linewidth, lineType=cv2.LINE_AA)
cv2.error: OpenCV(4.9.0) :-1: error: (-5:Bad argument) in function 'line'
> Overload resolution failed:
> - Can't parse 'pt1'. Sequence item with index 0 has a wrong type
> - Can't parse 'pt1'. Sequence item with index 0 has a wrong type
进程已结束,退出代码为 1
my gpu is gtx 1660super. nvidia-smi message is:
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.183.01 Driver Version: 535.183.01 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce GTX 1660 ... Off | 00000000:01:00.0 On | N/A |
| 0% 49C P8 4W / 125W | 503MiB / 6144MiB | 4% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
nvcc -V message is:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Sep_21_10:33:58_PDT_2022
Cuda compilation tools, release 11.8, V11.8.89
Build cuda_11.8.r11.8/compiler.31833905_0
i upgrade pytorch to 2.3.0+cu118 and recompile, but the result is consistent. someone try to up/down cuda version and try again? you need to repip pytorch3d offline at https://anaconda.org/pytorch3d/pytorch3d/files according to your cuda and pytorch version. you also need to repip pytorch3d and recompile nvdiffrast, build_all_conda.sh. before it, change c++14 to c++17 in bundlesdf/mycuda/setup.py and mycpp/CMakeLists.txt.
install cudnn will solve this bug
ok, i will try your method。3q very much!
install cudnn will solve this bug
what is your gpu? your method can't solve my bug on my 1660super. i think that 16xx series all have this question.
I'm facing this issue as well after resolving several other problems. I'm sharing a screenshot of how the crash happens. I'm also including the discussion thread for my experience so far below that. Installing cudnn didn't solve this issue for me. (note: it's all resolved now; please check the reporting thread linked below for the details)
这是来自QQ邮箱的假期自动回复邮件。 您好,我已收到您的邮件。我将尽快给您回复。
Hi, I have been trying to follow the steps to try to reproduce the results in anaconda in wsl and I am getting the following error while trying to run the demo (I also put here the results of build_all_conda just in case):
I have tried to search where the error migth be and it seems to be when trying to predict the pose though i am not 100% sure. Any help would be apreciated. Thanks in advance!