Deep_Object_Pose icon indicating copy to clipboard operation
Deep_Object_Pose copied to clipboard

Use training script train2 for NDDS data

Open WilkoLu opened this issue 3 years ago • 2 comments

Hello

I need NDDS Data to work on the "new" training script with tensorboard visualisation. It seems not possible yet. Do you consider to improve in this way? I want to use NDDS data for training and NVISII data for testing. NDDS is pretty performant in creating big datasets for training and NVISII delivers good looking testing datasets.

WilkoLu avatar Aug 15 '22 20:08 WilkoLu

Did you try? @mintar I think made everything backward compatible!

TontonTremblay avatar Aug 24 '22 16:08 TontonTremblay

I had to check myself to see what I did. This is what I did:

  • The old script (train.py) can now process both NDSS and NVISII data, but it doesn't have the nice tensorboard visualization.
  • The new script (train2/train.py) can only process NVISII data.

The second point is @WilkoLu 's problem.

However, I think the differences are small, so it should be easy to adapt train2 to the NDSS format. Here is what's currently failing:

  • "visibility" must be > 0, but it's always 0 in my NDSS data: https://github.com/NVlabs/Deep_Object_Pose/blob/538d12bf1aef17d3f094eaefe4f82d46d69b0575/scripts/train2/utils_dope.py#L227

I think the best solution here would be to fix the NDSS json data (search/replace), because NDSS only stores visible objects (but always sets visibility to "0"), whereas "visibility = 0" in NVISII means that the object actually is occluded/out of view, so it must be discarded.

  • "projected_cuboid" must have 9 points (8 cuboid corners + centroid); the NDSS data has 8 points, and the field "projected_cuboid_centroid" is stored separately: https://github.com/NVlabs/Deep_Object_Pose/blob/538d12bf1aef17d3f094eaefe4f82d46d69b0575/scripts/train2/utils_dope.py#L228

Here we could check whether we have 8 or 9 points in the json file, and if it's 8, read "projected_cuboid_centroid" and append it, like I did in the old train.py script:

https://github.com/NVlabs/Deep_Object_Pose/blob/538d12bf1aef17d3f094eaefe4f82d46d69b0575/scripts/train.py#L294-L300

I think in the long run we should unify train.py and train2, there's no point in keeping both around.

mintar avatar Aug 25 '22 08:08 mintar