habitat-lab
habitat-lab copied to clipboard
what is the relationship between xxx.semantic.txt and xxx.semantic.glb?
i get a rgb image from xxx.semantic.glb
and the floor RGB=(33, 185, 0)
but i cannot find a close color in xxx.semantic.txt about floor.
my code:
Hey @zuixiaosanlang I believe your understanding is correct. The hex color in the text file should map to the color of the painted texture region in the .glb asset. We render a flat shaded image of that texture.
If you can provide the specific scene name here we can take a closer look.
Hi @zuixiaosanlang ~~The GLAQ4DNUx5U.semantic.txt semantic text file should contain 907 entries, but it seems the file you are reading in only has 23. GLAQ4DNUx5U.semantic.txt~~
Actually, the color you are seeing, (33, 185, 0), maps to 0x21B900 which does not seem to be present in that semantic txt file. This bears further investigation. Thank you for bringing this to our attention.
When I launch the scene in habitat using a pinhole camera, I get the semantic mapping for the floor to be 339_floor, which is color 0x87E719/ rgb : 135, 231, 35. How are you getting the color query result for the floor?
@jturner65 Hi, 0x87E719 should be rgb : 135, 231, 25. 0x19=1*16+9=25
use MeshLab tool to compare:
the floor color in your picture should be rgb(62, 204, 2), hex: 0x3ecc02
Hi @aclegg3 00861-GLAQ4DNUx5U
also you can check other scene, for example 00006-HkseAnWCgqk. it is the same problem.
If it's my fault, please correct me. thanks.
@jturner65 Hi, 0x87E719 should be rgb : 135, 231, 25. 0x19=1*16+9=25
Yes, that was a typo on my part, apologies, and thank you for correcting it.
Please let me know what mechanism you are using to query the color in your original post, so that as I attempt to figure out any potential issues I can follow the same pathway you did.
Thank you!
@jturner65
Hi,
i create tensor:
get rgb image from xxx.semantic.glb:
save rgb image:
then i check the floor color in rgb image, compared whith xxx.semantic.txt.
Are you setting up the sensor as a semantic sensor?
Hi, @jturner65
if i set sensor as a semantic sensor, i got all zeros.
then next line run failed batch = batch_obs([observations])
@jturner65 i run the code and cannot get the semantic label.
https://aihabitat.org/docs/habitat-sim/image-extractor.html
and my env:
thanks.