Beispiel #1
0
    def __init__(self, config):
        LoaderInterface.__init__(self, config)

        self._file_path = Utility.resolve_path(
            self.config.get_string("file_path"))

        self._texture_folder = Utility.resolve_path(
            self.config.get_string("texture_folder"))

        # the default unknown texture folder is not included inside of the scenenet texture folder
        default_unknown_texture_folder = os.path.join(self._texture_folder,
                                                      "unknown")
        # the textures in this folder are used, if the object has no available texture
        self._unknown_texture_folder = Utility.resolve_path(
            self.config.get_string("unknown_texture_folder",
                                   default_unknown_texture_folder))

        LabelIdMapping.assign_mapping(
            Utility.resolve_path(
                os.path.join('resources', 'id_mappings', 'nyu_idset.csv')))

        if LabelIdMapping.label_id_map:
            bpy.context.scene.world[
                "category_id"] = LabelIdMapping.label_id_map["void"]
        else:
            print(
                "Warning: The category labeling file could not be found -> no semantic segmentation available!"
            )
Beispiel #2
0
 def __init__(self, config):
     LoaderInterface.__init__(self, config)
     self.house_path = Utility.resolve_path(self.config.get_string("path"))
     suncg_folder_path = os.path.join(os.path.dirname(self.house_path), "../..")
     self.suncg_dir = self.config.get_string("suncg_path", suncg_folder_path)
     self._collection_of_loaded_objs = {}
     # there are only two types of materials, textures and diffuse
     self._collection_of_loaded_mats = {"texture": {}, "diffuse": {}}
     LabelIdMapping.assign_mapping(Utility.resolve_path(os.path.join('resources', 'id_mappings', 
         'nyu_idset.csv')))
Beispiel #3
0
    def __init__(self, config):
        LoaderInterface.__init__(self, config)
        self.house_path = Utility.resolve_path(self.config.get_string("path"))
        suncg_folder_path = os.path.join(os.path.dirname(self.house_path),
                                         "../..")
        self.suncg_dir = self.config.get_string("suncg_path",
                                                suncg_folder_path)

        LabelIdMapping.assign_mapping(
            Utility.resolve_path(
                os.path.join('resources', 'id_mappings', 'nyu_idset.csv')))
Beispiel #4
0
    def __init__(self, config):
        Loader.__init__(self, config)

        self._file_path = Utility.resolve_path(
            self.config.get_string("file_path"))

        self._texture_folder = Utility.resolve_path(
            self.config.get_string("texture_folder"))
        LabelIdMapping.assign_mapping(
            Utility.resolve_path(
                os.path.join('resources', 'id_mappings', 'nyu_idset.csv')))

        if LabelIdMapping.label_id_map:
            bpy.data.scenes["Scene"]["num_labels"] = LabelIdMapping.num_labels
            bpy.context.scene.world[
                "category_id"] = LabelIdMapping.label_id_map["void"]
        else:
            print(
                "Warning: The category labeling file could not be found -> no semantic segmentation available!"
            )