blenderproc.python.loader.Pix3DLoader module
Loading the Pix3D dataset.
- class blenderproc.python.loader.Pix3DLoader._Pix3DLoader[source]
Bases:
object
This loads an object from Pix3D based on the given category of objects to use.
From these objects one is randomly sampled and loaded.
Note: if this class is used with another loader that loads objects with semantic mapping, make sure the other module is loaded first. TODO: Really?
- static correct_materials(objects)[source]
If the used material contains an alpha texture, the alpha texture has to be flipped to be correct
- Parameters:
objects (
List
[MeshObject
]) – The list of mesh objects where the material maybe wrong.
- static get_files_with_category(used_category, data_path)[source]
Returns a list of a .obj file for the given category. This function creates a category path file for each used category. This will speed up the usage the next time the category is used.
- Parameters:
used_category (
str
) – the category something like: ‘bed’, see the data_path folder for categoriesdata_path (
str
) – path to the Pix3D folder
- Return type:
list
- Returns:
list of .obj files, which are in the data_path folder, based on the given category
- blenderproc.python.loader.Pix3DLoader.load_pix3d(used_category, data_path='resources/pix3d')[source]
Loads one random Pix3D object from the given category.
- Parameters:
used_category (
str
) – The category to use for example: ‘bed’, check the data_path/model folder for more categories. Available: [‘bed’, ‘bookcase’, ‘chair’, ‘desk’, ‘misc’, ‘sofa’, ‘table’, ‘tool’, ‘wardrobe’]data_path (
str
) – The path to the Pix3D folder.
- Return type:
List
[MeshObject
]- Returns:
The list of loaded mesh objects.