NVlabs / FoundationPose

[CVPR 2024 Highlight] FoundationPose: Unified 6D Pose Estimation and Tracking of Novel Objects
https://nvlabs.github.io/FoundationPose/
Other
955 stars 99 forks source link

Error while running the `run_demo.py` file for a novel object (model based) #83

Closed KomputerMaster64 closed 1 week ago

KomputerMaster64 commented 3 weeks ago

The run_demo.py file was modified for the novel red wooden block object.

I have referred to the #44 Issue here which was helpful, however I require further guidance.

I provided respective files for the subdirectories in rgb, depth, mask, and mesh. Additionally provided the cam_K.txt file. I also changed the parser arguments accordingly.

I have added the reference files to the Google Drive Folder Here: run_demo_red_block.py, cam_K.txt, AND the other files in rgb, depth, mask, and mesh have been added.

Note: Updated K matrix corresponding to the Intel RealSense Camera by using the command rostopic echo /camera/color/camera_info.

I am getting the main error as:

[ WARN:0@1.923] global loadsave.cpp:248 findDecoder imread_('/home/prabhav/Projects/NSRM_2024.03.29/Perception/FoundationPose/demo_data/red_block/masks/image_00001.png'): can't open/read file: check file path/integrity
Traceback (most recent call last):
  File "/home/prabhav/Projects/NSRM_2024.03.29/Perception/FoundationPose/run_demo_red_block.py", line 62, in <module>
    mask = reader.get_mask(0).astype(bool)
  File "/home/prabhav/Projects/NSRM_2024.03.29/Perception/FoundationPose/datareader.py", line 114, in get_mask
    if len(mask.shape)==3:
AttributeError: 'NoneType' object has no attribute 'shape'

I am using an NVIDIA RTX A4500 and an Intel Xeon Silver CPU (details about the hardware have been mentioned at the very end)

Note: Given below are the outputs for run_demo_red_block.py command, and the following commands: conda info, conda list, g++ --version, nvcc --version, lscpu, and nvidia-smi.


Here is the output for the command python run_demo_red_block.py:

This is the fulll output of the python run_demo_red_block.py file.

(foundationpose) prabhav@lithium:~/Projects/NSRM_2024.03.29/Perception/FoundationPose$ python run_demo_red_block.py
Warp 1.0.2 initialized:
   CUDA Toolkit 11.5, Driver 12.4
   Devices:
     "cpu"      : "x86_64"
     "cuda:0"   : "NVIDIA RTX A4500" (20 GiB, sm_86, mempool enabled)
   Kernel cache:
     /home/prabhav/.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/prabhav/Projects/NSRM_2024.03.29/Perception/FoundationPose/learning/training/../../weights/2024-01-11-20-02-45/model_best.pth

[__init__()] self.h5_file:None
[__init__()] Using pretrained model from /home/prabhav/Projects/NSRM_2024.03.29/Perception/FoundationPose/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/prabhav/Projects/NSRM_2024.03.29/Perception/FoundationPose/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/prabhav/Projects/NSRM_2024.03.29/Perception/FoundationPose/learning/training/../../weights/2023-10-28-18-33-37/model_best.pth
[__init__()] init done
[reset_object()] self.diameter:0.07794228634059948, vox_size:0.003897114317029974
[reset_object()] self.pts:torch.Size([8, 3])
[reset_object()] reset done
[make_rotation_grid()] cam_in_obs:(42, 4, 4)
[make_rotation_grid()] rot_grid:(252, 4, 4)
num original candidates = 252
num of pose after clustering: 252
[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
[ WARN:0@1.923] global loadsave.cpp:248 findDecoder imread_('/home/prabhav/Projects/NSRM_2024.03.29/Perception/FoundationPose/demo_data/red_block/masks/image_00001.png'): can't open/read file: check file path/integrity
Traceback (most recent call last):
  File "/home/prabhav/Projects/NSRM_2024.03.29/Perception/FoundationPose/run_demo_red_block.py", line 62, in <module>
    mask = reader.get_mask(0).astype(bool)
  File "/home/prabhav/Projects/NSRM_2024.03.29/Perception/FoundationPose/datareader.py", line 114, in get_mask
    if len(mask.shape)==3:
AttributeError: 'NoneType' object has no attribute 'shape'

Here is the output for the command conda info:

(foundationpose) prabhav@lithium:~/Projects/NSRM_2024.03.29/Perception/FoundationPose$ conda info

     active environment : foundationpose
    active env location : /home/prabhav/miniconda3/envs/foundationpose
            shell level : 1
       user config file : /home/prabhav/.condarc
 populated config files : /home/prabhav/.condarc
          conda version : 24.1.2
    conda-build version : not installed
         python version : 3.11.5.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=icelake
                          __conda=24.1.2=0
                          __cuda=12.4=0
                          __glibc=2.31=0
                          __linux=5.15.0=0
                          __unix=0=0
       base environment : /home/prabhav/miniconda3  (writable)
      conda av data dir : /home/prabhav/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/prabhav/miniconda3/pkgs
                          /home/prabhav/.conda/pkgs
       envs directories : /home/prabhav/miniconda3/envs
                          /home/prabhav/.conda/envs
               platform : linux-64
             user-agent : conda/24.1.2 requests/2.31.0 CPython/3.11.5 Linux/5.15.0-102-generic ubuntu/20.04.6 glibc/2.31 solver/libmamba conda-libmamba-solver/23.12.0 libmambapy/1.5.3
                UID:GID : 1003:1003
             netrc file : None
           offline mode : False

Here is the output for the command conda list:

(foundationpose) prabhav@lithium:~/Projects/NSRM_2024.03.29/Perception/FoundationPose$ conda list
# packages in environment at /home/prabhav/miniconda3/envs/foundationpose:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
_openmp_mutex             5.1                       1_gnu  
addict                    2.4.0                    pypi_0    pypi
aiohttp                   3.9.3                    pypi_0    pypi
aiosignal                 1.3.1                    pypi_0    pypi
albumentations            1.4.2                    pypi_0    pypi
antlr4-python3-runtime    4.9.3                    pypi_0    pypi
anyio                     4.3.0                    pypi_0    pypi
appdirs                   1.4.4                    pypi_0    pypi
argon2-cffi               23.1.0                   pypi_0    pypi
argon2-cffi-bindings      21.2.0                   pypi_0    pypi
arrow                     1.3.0                    pypi_0    pypi
asttokens                 2.4.1                    pypi_0    pypi
async-lru                 2.0.4                    pypi_0    pypi
async-timeout             4.0.3                    pypi_0    pypi
attrs                     23.2.0                   pypi_0    pypi
babel                     2.14.0                   pypi_0    pypi
beautifulsoup4            4.12.3                   pypi_0    pypi
bleach                    6.1.0                    pypi_0    pypi
blinker                   1.7.0                    pypi_0    pypi
bokeh                     3.4.0                    pypi_0    pypi
braceexpand               0.1.7                    pypi_0    pypi
brotli                    1.1.0                    pypi_0    pypi
ca-certificates           2024.3.11            h06a4308_0  
certifi                   2024.2.2                 pypi_0    pypi
cffi                      1.16.0                   pypi_0    pypi
charset-normalizer        3.3.2                    pypi_0    pypi
click                     8.1.7                    pypi_0    pypi
cmake                     3.29.0.1                 pypi_0    pypi
cmeel                     0.53.3                   pypi_0    pypi
cmeel-assimp              5.3.1                    pypi_0    pypi
cmeel-boost               1.83.0                   pypi_0    pypi
cmeel-console-bridge      1.0.2.2                  pypi_0    pypi
cmeel-octomap             1.9.8.2                  pypi_0    pypi
cmeel-qhull               8.0.2.1                  pypi_0    pypi
cmeel-tinyxml             2.6.2.3                  pypi_0    pypi
cmeel-urdfdom             3.1.1.1                  pypi_0    pypi
colorama                  0.4.6                    pypi_0    pypi
comm                      0.2.2                    pypi_0    pypi
common                    0.0.0                     dev_0    <develop>
configargparse            1.7                      pypi_0    pypi
contourpy                 1.2.0                    pypi_0    pypi
cycler                    0.12.1                   pypi_0    pypi
dash                      2.16.1                   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
dataclasses-json          0.6.4                    pypi_0    pypi
debugpy                   1.8.1                    pypi_0    pypi
decorator                 5.1.1                    pypi_0    pypi
defusedxml                0.7.1                    pypi_0    pypi
deprecated                1.2.14                   pypi_0    pypi
docker-pycreds            0.4.0                    pypi_0    pypi
eigenpy                   3.4.0                    pypi_0    pypi
einops                    0.7.0                    pypi_0    pypi
entrypoints               0.4                      pypi_0    pypi
et-xmlfile                1.1.0                    pypi_0    pypi
exceptiongroup            1.2.0                    pypi_0    pypi
executing                 2.0.1                    pypi_0    pypi
fastjsonschema            2.19.1                   pypi_0    pypi
ffmpeg-python             0.2.0                    pypi_0    pypi
filelock                  3.13.3                   pypi_0    pypi
flask                     3.0.2                    pypi_0    pypi
fonttools                 4.50.0                   pypi_0    pypi
fqdn                      1.5.1                    pypi_0    pypi
freetype-py               2.4.0                    pypi_0    pypi
frozenlist                1.4.1                    pypi_0    pypi
fsspec                    2024.3.1                 pypi_0    pypi
future                    1.0.0                    pypi_0    pypi
fvcore                    0.1.5.post20221221          pypi_0    pypi
g4f                       0.2.7.1                  pypi_0    pypi
gitdb                     4.0.11                   pypi_0    pypi
gitpython                 3.1.43                   pypi_0    pypi
gputil                    1.4.0                    pypi_0    pypi
h11                       0.14.0                   pypi_0    pypi
h5py                      3.10.0                   pypi_0    pypi
hpp-fcl                   2.4.4                    pypi_0    pypi
httpcore                  1.0.5                    pypi_0    pypi
httpx                     0.27.0                   pypi_0    pypi
huggingface-hub           0.22.2                   pypi_0    pypi
idna                      3.6                      pypi_0    pypi
imageio                   2.34.0                   pypi_0    pypi
imgaug                    0.4.0                    pypi_0    pypi
importlib-metadata        7.1.0                    pypi_0    pypi
importlib-resources       6.4.0                    pypi_0    pypi
iopath                    0.1.10                   pypi_0    pypi
ipycanvas                 0.13.1                   pypi_0    pypi
ipyevents                 2.0.2                    pypi_0    pypi
ipykernel                 6.29.4                   pypi_0    pypi
ipython                   8.18.1                   pypi_0    pypi
ipywidgets                8.1.2                    pypi_0    pypi
isoduration               20.11.0                  pypi_0    pypi
itsdangerous              2.1.2                    pypi_0    pypi
jedi                      0.19.1                   pypi_0    pypi
jinja2                    3.1.3                    pypi_0    pypi
joblib                    1.3.2                    pypi_0    pypi
json5                     0.9.24                   pypi_0    pypi
jsonpatch                 1.33                     pypi_0    pypi
jsonpointer               2.4                      pypi_0    pypi
jsonschema                4.21.1                   pypi_0    pypi
jsonschema-specifications 2023.12.1                pypi_0    pypi
jupyter-client            7.4.9                    pypi_0    pypi
jupyter-core              5.7.2                    pypi_0    pypi
jupyter-events            0.10.0                   pypi_0    pypi
jupyter-lsp               2.2.4                    pypi_0    pypi
jupyter-server            2.13.0                   pypi_0    pypi
jupyter-server-terminals  0.5.3                    pypi_0    pypi
jupyterlab                4.1.5                    pypi_0    pypi
jupyterlab-pygments       0.3.0                    pypi_0    pypi
jupyterlab-server         2.25.4                   pypi_0    pypi
jupyterlab-widgets        3.0.10                   pypi_0    pypi
kaolin                    0.15.0                   pypi_0    pypi
kiwisolver                1.4.5                    pypi_0    pypi
kornia                    0.7.2                    pypi_0    pypi
kornia-rs                 0.1.2                    pypi_0    pypi
lazy-loader               0.3                      pypi_0    pypi
ld_impl_linux-64          2.38                 h1181459_1  
libffi                    3.4.4                h6a678d5_0  
libgcc-ng                 11.2.0               h1234567_1  
libgomp                   11.2.0               h1234567_1  
libstdcxx-ng              11.2.0               h1234567_1  
lit                       18.1.2                   pypi_0    pypi
llvmlite                  0.42.0                   pypi_0    pypi
loguru                    0.7.2                    pypi_0    pypi
markupsafe                2.1.5                    pypi_0    pypi
marshmallow               3.21.1                   pypi_0    pypi
matplotlib                3.8.3                    pypi_0    pypi
matplotlib-inline         0.1.6                    pypi_0    pypi
meshcat                   0.3.2                    pypi_0    pypi
mistune                   3.0.2                    pypi_0    pypi
mpmath                    1.3.0                    pypi_0    pypi
multidict                 6.0.5                    pypi_0    pypi
mypy-extensions           1.0.0                    pypi_0    pypi
nbclient                  0.10.0                   pypi_0    pypi
nbconvert                 7.16.3                   pypi_0    pypi
nbformat                  5.10.3                   pypi_0    pypi
ncurses                   6.4                  h6a678d5_0  
nest-asyncio              1.6.0                    pypi_0    pypi
networkx                  3.2.1                    pypi_0    pypi
ninja                     1.11.1.1                 pypi_0    pypi
nodejs                    0.1.1                    pypi_0    pypi
notebook-shim             0.2.4                    pypi_0    pypi
numba                     0.59.1                   pypi_0    pypi
numpy                     1.26.4                   pypi_0    pypi
nvdiffrast                0.3.1                    pypi_0    pypi
objaverse                 0.1.7                    pypi_0    pypi
omegaconf                 2.3.0                    pypi_0    pypi
open3d                    0.18.0                   pypi_0    pypi
opencv-contrib-python     4.9.0.80                 pypi_0    pypi
opencv-python             4.9.0.80                 pypi_0    pypi
opencv-python-headless    4.9.0.80                 pypi_0    pypi
openpyxl                  3.1.2                    pypi_0    pypi
openssl                   3.0.13               h7f8727e_0  
optional-django           0.1.0                    pypi_0    pypi
overrides                 7.7.0                    pypi_0    pypi
packaging                 24.0                     pypi_0    pypi
panda3d                   1.10.14                  pypi_0    pypi
pandas                    2.2.1                    pypi_0    pypi
pandocfilters             1.5.1                    pypi_0    pypi
parso                     0.8.3                    pypi_0    pypi
pexpect                   4.9.0                    pypi_0    pypi
pillow                    10.3.0                   pypi_0    pypi
pin                       2.7.0                    pypi_0    pypi
pip                       23.3.1           py39h06a4308_0  
platformdirs              4.2.0                    pypi_0    pypi
plotly                    5.20.0                   pypi_0    pypi
portalocker               2.8.2                    pypi_0    pypi
prometheus-client         0.20.0                   pypi_0    pypi
prompt-toolkit            3.0.43                   pypi_0    pypi
protobuf                  4.25.3                   pypi_0    pypi
psutil                    5.9.8                    pypi_0    pypi
ptyprocess                0.7.0                    pypi_0    pypi
pure-eval                 0.2.2                    pypi_0    pypi
py-spy                    0.3.14                   pypi_0    pypi
pyarrow                   15.0.2                   pypi_0    pypi
pybind11                  2.12.0                   pypi_0    pypi
pybullet                  3.2.6                    pypi_0    pypi
pycocotools               2.0.7                    pypi_0    pypi
pycparser                 2.22                     pypi_0    pypi
pycryptodome              3.20.0                   pypi_0    pypi
pyglet                    1.5.28                   pypi_0    pypi
pygltflib                 1.16.2                   pypi_0    pypi
pygments                  2.17.2                   pypi_0    pypi
pyngrok                   7.1.6                    pypi_0    pypi
pyopengl                  3.1.0                    pypi_0    pypi
pyopengl-accelerate       3.1.7                    pypi_0    pypi
pyparsing                 3.1.2                    pypi_0    pypi
pypng                     0.20220715.0             pypi_0    pypi
pyquaternion              0.9.9                    pypi_0    pypi
pyrender                  0.1.45                   pypi_0    pypi
pysdf                     0.1.9                    pypi_0    pypi
python                    3.9.19               h955ad1f_0  
python-dateutil           2.9.0.post0              pypi_0    pypi
python-json-logger        2.0.7                    pypi_0    pypi
pytorch3d                 0.7.3                    pypi_0    pypi
pytz                      2024.1                   pypi_0    pypi
pyyaml                    6.0.1                    pypi_0    pypi
pyzmq                     24.0.1                   pypi_0    pypi
readline                  8.2                  h5eee18b_0  
referencing               0.34.0                   pypi_0    pypi
requests                  2.31.0                   pypi_0    pypi
retrying                  1.3.4                    pypi_0    pypi
rfc3339-validator         0.1.4                    pypi_0    pypi
rfc3986-validator         0.1.1                    pypi_0    pypi
roma                      1.4.4                    pypi_0    pypi
rpds-py                   0.18.0                   pypi_0    pypi
rtree                     1.2.0                    pypi_0    pypi
ruamel-yaml               0.18.6                   pypi_0    pypi
ruamel-yaml-clib          0.2.8                    pypi_0    pypi
safetensors               0.4.2                    pypi_0    pypi
scikit-image              0.22.0                   pypi_0    pypi
scikit-learn              1.4.1.post1              pypi_0    pypi
scipy                     1.12.0                   pypi_0    pypi
seaborn                   0.13.2                   pypi_0    pypi
send2trash                1.8.2                    pypi_0    pypi
sentry-sdk                1.44.0                   pypi_0    pypi
setproctitle              1.3.3                    pypi_0    pypi
setuptools                68.2.2           py39h06a4308_0  
shapely                   2.0.3                    pypi_0    pypi
simplejson                3.19.2                   pypi_0    pypi
six                       1.16.0                   pypi_0    pypi
smmap                     5.0.1                    pypi_0    pypi
sniffio                   1.3.1                    pypi_0    pypi
soupsieve                 2.5                      pypi_0    pypi
sqlite                    3.41.2               h5eee18b_0  
stack-data                0.6.3                    pypi_0    pypi
sympy                     1.12                     pypi_0    pypi
tabulate                  0.9.0                    pypi_0    pypi
tenacity                  8.2.3                    pypi_0    pypi
termcolor                 2.4.0                    pypi_0    pypi
terminado                 0.18.1                   pypi_0    pypi
threadpoolctl             3.4.0                    pypi_0    pypi
tifffile                  2024.2.12                pypi_0    pypi
timm                      0.9.16                   pypi_0    pypi
tinycss2                  1.2.1                    pypi_0    pypi
tk                        8.6.12               h1ccaba5_0  
tomli                     2.0.1                    pypi_0    pypi
torch                     2.0.0+cu118              pypi_0    pypi
torchaudio                2.0.1+cu118              pypi_0    pypi
torchnet                  0.0.4                    pypi_0    pypi
torchvision               0.15.1+cu118             pypi_0    pypi
tornado                   6.4                      pypi_0    pypi
tqdm                      4.66.2                   pypi_0    pypi
traitlets                 5.14.2                   pypi_0    pypi
transformations           2024.6.1                 pypi_0    pypi
trimesh                   4.2.2                    pypi_0    pypi
triton                    2.0.0                    pypi_0    pypi
types-python-dateutil     2.9.0.20240316           pypi_0    pypi
typing-extensions         4.10.0                   pypi_0    pypi
typing-inspect            0.9.0                    pypi_0    pypi
tzdata                    2024.1                   pypi_0    pypi
u-msgpack-python          2.8.0                    pypi_0    pypi
ultralytics               8.0.120                  pypi_0    pypi
uri-template              1.3.0                    pypi_0    pypi
urllib3                   2.2.1                    pypi_0    pypi
usd-core                  23.5                     pypi_0    pypi
videoio                   0.2.8                    pypi_0    pypi
visdom                    0.2.4                    pypi_0    pypi
wandb                     0.16.5                   pypi_0    pypi
warp-lang                 1.0.2                    pypi_0    pypi
wcwidth                   0.2.13                   pypi_0    pypi
webcolors                 1.13                     pypi_0    pypi
webdataset                0.2.86                   pypi_0    pypi
webencodings              0.5.1                    pypi_0    pypi
websocket-client          1.7.0                    pypi_0    pypi
werkzeug                  3.0.2                    pypi_0    pypi
wheel                     0.41.2           py39h06a4308_0  
widgetsnbextension        4.0.10                   pypi_0    pypi
wrapt                     1.16.0                   pypi_0    pypi
xatlas                    0.0.9                    pypi_0    pypi
xlsxwriter                3.2.0                    pypi_0    pypi
xyzservices               2023.10.1                pypi_0    pypi
xz                        5.4.6                h5eee18b_0  
yacs                      0.1.8                    pypi_0    pypi
yarl                      1.9.4                    pypi_0    pypi
zipp                      3.18.1                   pypi_0    pypi
zlib                      1.2.13               h5eee18b_0  

Here is the output for the command g++ --version:

(foundationpose) USER@MACHINE:~$ g++ --version
g++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Here is the output for the command nvcc --version:

(foundationpose) USER@MACHINE:~$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Sun_Mar_21_19:15:46_PDT_2021
Cuda compilation tools, release 11.3, V11.3.58
Build cuda_11.3.r11.3/compiler.29745058_0

Information about the CPU

Intel CPU Information

USER@MACHINE:~$ lscpu
Architecture:                       x86_64
CPU op-mode(s):                     32-bit, 64-bit
Byte Order:                         Little Endian
Address sizes:                      46 bits physical, 57 bits virtual
CPU(s):                             64
On-line CPU(s) list:                0-63
Thread(s) per core:                 2
Core(s) per socket:                 16
Socket(s):                          2
NUMA node(s):                       2
Vendor ID:                          GenuineIntel
CPU family:                         6
Model:                              106
Model name:                         Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz
Stepping:                           6
CPU MHz:                            3400.000
CPU max MHz:                        3400.0000
CPU min MHz:                        800.0000
BogoMIPS:                           4800.00
Virtualization:                     VT-x
L1d cache:                          1.5 MiB
L1i cache:                          1 MiB
L2 cache:                           40 MiB
L3 cache:                           48 MiB
NUMA node0 CPU(s):                  0-15,32-47
NUMA node1 CPU(s):                  16-31,48-63
Vulnerability Gather data sampling: Mitigation; Microcode
Vulnerability Itlb multihit:        Not affected
Vulnerability L1tf:                 Not affected
Vulnerability Mds:                  Not affected
Vulnerability Meltdown:             Not affected
Vulnerability Mmio stale data:      Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Retbleed:             Not affected
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass:    Mitigation; Speculative Store Bypass disabled via prctl and secco
                                    mp
Vulnerability Spectre v1:           Mitigation; usercopy/swapgs barriers and __user pointer sanitizat
                                    ion
Vulnerability Spectre v2:           Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-e
                                    IBRS SW sequence
Vulnerability Srbds:                Not affected
Vulnerability Tsx async abort:      Not affected
Flags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat
                                     pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx
                                     pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_goo
                                    d nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes6
                                    4 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pc
                                    id dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes x
                                    save avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb ca
                                    t_l3 invpcid_single intel_ppin ssbd mba ibrs ibpb stibp ibrs_enha
                                    nced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_ad
                                    just bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq 
                                    rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_
                                    ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_o
                                    ccup_llc cqm_mbm_total cqm_mbm_local split_lock_detect wbnoinvd d
                                    therm ida arat pln pts avx512vbmi umip pku ospke avx512_vbmi2 gfn
                                    i vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq 
                                    la57 rdpid fsrm md_clear pconfig flush_l1d arch_capabilities

Information about the GPU

NVIDIA GPU Information

USER@MACHINE:~$ nvidia-smi
Sat Mar 30 15:48:06 2024       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.67                 Driver Version: 550.67         CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
| 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 RTX A4500               Off |   00000000:4B:00.0  On |                  Off |
| 30%   46C    P8             26W /  200W |     660MiB /  20470MiB |      3%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A      1923      G   /usr/lib/xorg/Xorg                            147MiB |
|    0   N/A  N/A      2386      G   /usr/bin/gnome-shell                          387MiB |
|    0   N/A  N/A     42174      G   ...99,262144 --variations-seed-version        115MiB |
+-----------------------------------------------------------------------------------------+
KomputerMaster64 commented 3 weeks ago

Is it recommended to edit the dictionary videoname_to_object by adding new key value pair for the red_block? image

Note: the mentioned dictionary can be found here in the datareader.py file, inside the YcbineaotReader class.

KomputerMaster64 commented 3 weeks ago

I was thinking about the error message, could it be attributed to the mask's file format. The mustard0 demo has the mask file in .png format while as the provided binary mask in the red_block demo is .jpg.

This solved the error, but the tracking was not accurate, I will be sharing the sample video.

mustard0 mask 1581120424100262102

red_block mask image_00001

KomputerMaster64 commented 3 weeks ago

Update: @wenbowen123 I am able to run the model for the novel object (red wooden block), however it is not able ot calculate the 6D pose as well as the Mustard Bottle Demo.

The Issue #44 as a reference was really helpful.

I have attached the link to the detection and tracking video file as a Google Drive File for your kind reference.

wenbowen123 commented 3 weeks ago

Hi, your gdrive link is not accessible.

wenbowen123 commented 3 weeks ago

In args, can you set the debug level to 3 and share the logged debug folder? This will save more running details and I can help check further.

KomputerMaster64 commented 3 weeks ago

Thank you for the response. I have set the debug vairable to level 3 and have also added the reference files to the Google Drive Folder Here

wenbowen123 commented 3 weeks ago

From the bbox viz, it seems like your depth could be wrong. However, the zip file does not contain all the debugging info, disallowing me to check further. There should be other things such as scene**.ply files, model_tf.obj, viz_refine.png, viz_score.png, etc.

Wahaha-code commented 3 weeks ago

The name of the mask should be consistent with the name of the first frame of your rgb image. This error should be due to the fact that the mask was not read.

KomputerMaster64 commented 3 weeks ago

__

From the bbox viz, it seems like your depth could be wrong. However, the zip file does not contain all the debugging info, disallowing me to check further. There should be other things such as scene**.ply files, model_tf.obj, viz_refine.png, viz_score.png, etc.

The current file used to call the demo is run_demo_red_block_02.py (which can be found here in the Google Drive Folder). I used the trimesh scaling as shared in the comment under the Issue #44 here:

trimesh.units.unit_conversion('millimeters', 'meters')
mesh = trimesh.load(args.mesh_file)
mesh.apply_scale(0.001)
mesh.export('scaled_down_file.obj')

I have uploaded the new demo FoundationPose_demo_02.zip directory here in the Google Drive Folder.

Remarks:

  1. The tracking seems to drift away from the object in the sample frames. Also sometimes near the end of the samples the scale of the 3D pose gets increased.
  2. changing the parameters est_refine_iter (default=5) and track_refine_iter (default=2) DID NOT HELP.

Additionally, It would be great if you could guide me to get all the debugging info (and even the scene**.ply files, model_tf.obj, viz_refine.png, viz_score.png, etc.).

__

The name of the mask should be consistent with the name of the first frame of your rgb image. This error should be due to the fact that the mask was not read.

(DONE)

wenbowen123 commented 3 weeks ago

@KomputerMaster64 the debugging info are saved in the debug_dir https://github.com/NVlabs/FoundationPose/blob/fce37c86be33ee49cf0b46ee29ed26d613521d6d/run_demo.py#L23

If you didn't change it, by default it is under the repo (where you cloned) dir.

wenbowen123 commented 3 weeks ago

something wrong is going on, cause even the first frame is not correct. So it's probably not tracking drift, but setup issue. Send the debug folder so I can know better.

KomputerMaster64 commented 3 weeks ago

__

@KomputerMaster64 the debugging info are saved in the debug_dir

https://github.com/NVlabs/FoundationPose/blob/fce37c86be33ee49cf0b46ee29ed26d613521d6d/run_demo.py#L23

If you didn't change it, by default it is under the repo (where you cloned) dir.

Thanks for for the response.

__

something wrong is going on, cause even the first frame is not correct. So it's probably not tracking drift, but setup issue. Send the debug folder so I can know better.

I have uploaded the new debug.zip file here (this is corresponding to the FoundationPose_demo_02.zip) in the Google Drive Folder.

The FoundationPose_demo_02.zip file has the correct camera sensor intrinsics, the aligned Depth and RGB images, as well as the CAD model with the correct scaling.

wenbowen123 commented 3 weeks ago

check your ob_mask.png in the debug dir, which seems not aligned with your rgb. It is also skewed. You might have done some unsuitable operation.

KomputerMaster64 commented 3 weeks ago

__

check your ob_mask.png in the debug dir, which seems not aligned with your rgb. It is also skewed. You might have done some unsuitable operation.

Thank you for pointing that out. I changed the scipt for the binary masks generation, the mask now looks more accurate.

I have uploaded the new debug.zip file here (this is corresponding to the FoundationPose_demo_04.zip) in the Google Drive Folder.

The FoundationPose_demo_04.zip file has the correct aligned Depth and RGB images.

Remarks: The estimation and tracking are really well for the first few hundred frames, i.e. till image 1714129801937.png (157 images). After which, the predicted pose starts drifitng and warping.

__ The correct mask for the first image. 1714129794962 1714129794962

__ The last frame with the correct prediction, and the frame after which the prediction was not optimal. 1714129801937 1714129801981

wenbowen123 commented 3 weeks ago

the bottom two images show a significant jump which is not very suitable for tracking. You can increase the camera frame rate if possible. Otherwise, you can also try with higher iter https://github.com/NVlabs/FoundationPose/blob/fce37c86be33ee49cf0b46ee29ed26d613521d6d/run_demo.py#L21

KomputerMaster64 commented 1 week ago

the bottom two images show a significant jump which is not very suitable for tracking. You can increase the camera frame rate if possible. Otherwise, you can also try with higher iter

https://github.com/NVlabs/FoundationPose/blob/fce37c86be33ee49cf0b46ee29ed26d613521d6d/run_demo.py#L21

Hi @wenbowen123

I am sorry for the delayed response. I ran the experiments with values for track_refine_iter variable ranging from 2 to 50, however it was observed that the tracking invariably drifted towards the end samples (last 15 to 20 percent of the video). I would be delighted to share the files.

Regards, Prabhav

__ Edit: I am sharing the failure case for the case with track_refine_iter variable set to 50.

Remarks: For the shown case, the tracking failure happends towards the end of the samples. The tracking is optimal till image 1714129813249.png i.e. for the first 410 samples (Total of 619 image samples).

Additional Remarks: This is an improvement it to the first case where track_refine_iter variable was set to 2, and the tracking was optimal only upto the 157 image samples.

I have uploaded the new FoundationPose_demo_05_eri-5_tri-50.zip file here (this is corresponding to the track_refine_iter variable set to 50) in the Google Drive Folder.

Question/Note: The total size of the debugging directories for the 49 experiments is 7 GB. It would be great if you could confirm if it is required to share all of the experiments' files.

__ The last frame with the correct tracking (top), and the frame after which the trakcing was not optimal (bottom). 1714129813249 1714129813295