Open Lovebaby-1mt opened 5 months ago
I do not know the exact problem based on the current information, but it seems that cam_dict
does not have the key 0
. I just verify that str_im_id=0
should be a valid key, then there may be something wrong about cam_dict
. cam_dict
is created as https://github.com/RuyiLian/CheckerPose/blob/fb725bed2a9eb6c3646c476c017d9ad00aa63a28/checkerpose/tools_for_LM/get_lm_datasets.py#L80
I suggest that you could check whether the path is invalid, or whether the json file is incomplete.
Thank you for replying me After re-preparing the dataset I successfully ran the pretrain.I made a mistake in dataset,not download the BOPdataset but the officical,and mix up the lm and lmo.but now problem is fixed and sincere thanks for your warm reply and your sophisticated ieda.
抱歉再次追问一下,我的lmo路径配置结构是 -lmo --fps_202212 --image_set --models --models_eval --test --train --camera.json --dataset_info.md --test_targets_all.json --test_targets_bop19.json
但最后发生了错误
datasets/BOP_DATASETS/lmo/models/obj_000001.ply
datasets/BOP_DATASETS/lmo/models/obj_000005.ply
datasets/BOP_DATASETS/lmo/models/obj_000006.ply
datasets/BOP_DATASETS/lmo/models/obj_000008.ply
datasets/BOP_DATASETS/lmo/models/obj_000009.ply
datasets/BOP_DATASETS/lmo/models/obj_000010.ply
datasets/BOP_DATASETS/lmo/models/obj_000011.ply
datasets/BOP_DATASETS/lmo/models/obj_000012.ply
if models are not fully listed above, please make sure there are ply files available
datasets/BOP_DATASETS/lmo/models/obj_000001.ply
obj_diameter 102.099
load FPS points from datasets/BOP_DATASETS/lmo/fps_202212/obj_000001.pkl
FPS points, [before normalization] min -45.8286018371582 max 45.687198638916016 [after normalization] min -0.6510339126594673 max 0.9920106815910728
Traceback (most recent call last):
File "pretrain.py", line 342, in
We follow the conventions of previous work and thus it may be a bit confusing for LM and LMO dataset. When naming the training sets in our codes, for LM we follow GDR-Net while for LM-O we follow ZebraPose.
For LMO dataset, there are two sets of training data: train_pbr
and train_real
, as shown in the config file
https://github.com/RuyiLian/CheckerPose/blob/fb725bed2a9eb6c3646c476c017d9ad00aa63a28/checkerpose/config/lmo/init_gnn2_hrnetw18_npt512.txt#L5-L6
train_pbr
can be downloaded from https://huggingface.co/datasets/bop-benchmark/datasets/resolve/main/lm/lm_train_pbr.zip
(which contains physically based rendered images). Note that we use this synthetic training set in LMO but not in LM. train_real
is actually the test images of LM. It
can be downloaded from https://huggingface.co/datasets/bop-benchmark/datasets/resolve/main/lm/lm_test_all.zip
. We use this set of images as real training images for LMO following previous works.你好,那关于ycbv的config是在哪呢,而且readme中提到的在ycbv数据集下的train_real是不是也来自于lm_test_all.zip
convert_cfg_lmo_to_ycbv.py
to generate configs from the corresponding ones of LM-O dataset (see README for more details of converting the configs). This is because for both LM-O and YBC-V, we train a single network for each object with almost the same hyper-parameters.train_pbr
from https://huggingface.co/datasets/bop-benchmark/datasets/resolve/main/ycbv/ycbv_train_pbr.zip and train_real
from https://bop.felk.cvut.cz/media/data/bop_datasets/ycbv_train_real.zip. To get more information of 6DoF object pose estimation datasets, you could check https://bop.felk.cvut.cz/datasets/. "And then run pretrain.py
similar to LMO."的意思是运行
python pretrain.py --cfg config/ycbv/init_gnn2_hrnetw18_npt512.txt --obj_name ape
是这样的吗?但是我这边却报错
Traceback (most recent call last):
File "pretrain.py", line 343, in
如果运行 python pretrain.py --cfg config/ycbv/init_gnn2_hrnetw18_npt512.txt
Traceback (most recent call last):
File "pretrain.py", line 328, in
Try to change --obj_name
to one of the objects used in YCB-V dataset, e.g. master_chef_can
, and run the command as:
python pretrain.py --cfg config/ycbv/init_gnn2_hrnetw18_npt512.txt --obj_name master_chef_can
The names of all the YCB-V objects can be found in
https://github.com/RuyiLian/CheckerPose/blob/fb725bed2a9eb6c3646c476c017d9ad00aa63a28/checkerpose/tools_for_BOP/common_dataset_info.py#L30-L52
LM dataset uses a different set of objects as listed in
https://github.com/RuyiLian/CheckerPose/blob/fb725bed2a9eb6c3646c476c017d9ad00aa63a28/checkerpose/tools_for_LM/get_lm_datasets.py#L300-L314
and LM-O dataset uses 8 of the LM objects (i.e. ape, can, cat, driller, duck, eggbox, glue, holepuncher).
how to test with trained models you upload
我遇到了一些问题: 用我自己训练的模型测试的话,路径会是checkerpose/experiments/checkpoints/hr18GNN2_res6_gnn3Skip_mlpQuery_lm/best_score/0_9638step239999
而下载的模型,比如说测试LM LM/archive/data.pkl 我这边运行不下去,觉得两边格式不完全一样,所以想问一下
Could you try to use LM
instead of LM/archive/data.pk
for the checkpoint path?
If it still does not work, make sure that the downloaded checkpoints are not decompressed.
Sorry, is there any code for visualizing the results in this project?
No, you could look into other GitHub repos of pose estimation.
在运行 python pretrain_lm.py --cfg config/lm/init_gnn2_hrnetw18_npt512_lm.txt后出现的问题
Traceback (most recent call last): File "pretrain_lm.py", line 303, in
main(configs)
File "pretrain_lm.py", line 130, in main
test_dataset = lm_dataset_single_obj_pytorch_code2d(
File "/root/autodl-tmp/checkerpose/lm_dataset_pytorch.py", line 322, in init
self.data_dicts = get_lm_data_dicts(dataset_name, dataset_root)
File "/root/autodl-tmp/checkerpose/tools_for_LM/get_lm_datasets.py", line 402, in get_lm_data_dicts
data_dicts = get_lm_13_dicts(data_cfg)
File "/root/autodl-tmp/checkerpose/tools_for_LM/get_lm_datasets.py", line 95, in get_lm_13_dicts
K = np.array(cam_dict[str_im_id]["cam_K"], dtype=np.float32).reshape(3, 3)
KeyError: '0'
这个问题实在没有头绪,希望能得到解答!