ylabbe / cosypose

Code for "CosyPose: Consistent multi-view multi-object 6D pose estimation", ECCV 2020.
MIT License
301 stars 89 forks source link

Training on customized Dataset #52

Open chrisxu1995 opened 3 years ago

chrisxu1995 commented 3 years ago

Hi, I generate my customized PBR Dataset from BlenderProc for BOP_challenge, and also generate mask and gt from bop_toolkit. Now I uesd run_pose_training.py with config "bop_ycbv_pbr_coarse". And I got the error :

Exception has occurred: AssertionError exception: no description File "/home/u2/cosypose/cosypose/lib3d/mesh_ops.py", line 33, in sample_points assert n_points <= points.shape[1] File "/home/u2/cosypose/cosypose/lib3d/rigid_mesh_database.py", line 94, in sample_points return sample_points(self.points, n_points, deterministic=deterministic) File "/home/u2/cosypose/cosypose/training/pose_forward_loss.py", line 29, in h_pose points = meshes.sample_points(cfg.n_points_loss, deterministic=False) File "/home/u2/cosypose/cosypose/training/train_pose.py", line 320, in train_epoch loss = h(data=sample, meters=meters_train) File "/home/u2/cosypose/cosypose/training/train_pose.py", line 353, in train_pose train_epoch() File "/home/u2/cosypose/run_pose_training.py", line 209, in train_pose(cfg)

And n_points=2600, points.shape[1]=1148.

What is the reason for this error. what do the n_points und points mean?

yupei-git commented 3 years ago

The problem may lie in the fact that ycbv's objects are relatively large and your objects are small. You can try changing cfg.n_points_loss in run_pose_training.py to a smaller number. In my scenario, I used 500 instead of 2600.

hannes56a commented 2 years ago

Hi @chrisxu1995 were you able to train on your own customized dataset? I have some problems, and i think the reason for my problems are in my 3d data. Do you know any condition for builing own 3d Models for rendering/training? If i use my own model for training i have problems, if i use a model from "TLESS" and do all the rest on my own (rendering, training), it works... I have another issue open related to this problem: https://github.com/ylabbe/cosypose/issues/64

Do you build also a model on your own? Perhaps you have some hints, tips, ideas?