def __init__(self, args=None, scale=0.4):
     self.dataset = data.ApolloScape(args)
     h, w = self.dataset._data_config['image_size']
     self.image_size = np.uint32(
         uts.round_prop_to(np.float32([h * scale, w * scale])))
     self.shader = {}
     for shader_name in ['vertex', 'fragment', 'geometry']:
         self.shader[shader_name] = './%s/PointLabel.%sshader' % \
                 ('./renderer/shader', shader_name)
Ejemplo n.º 2
0
    def __init__(self, args=None, scale=0.4, linewidth=0.):
        """Initializer
        Input:
            scale: whether resize the image in case image is too large
            linewidth: 0 indicates a binary mask, while > 0 indicates
                       using a frame.
        """
        self.dataset = data.ApolloScape(args)
        self._data_config = self.dataset.get_3d_car_config()

        self.MAX_DEPTH = 1e4
        self.MAX_INST_NUM = 100
        h, w = self._data_config['image_size']

        # must round prop to 4 due to renderer requirements
        # this will change the original size a bit, we usually need rescale
        # due to large image size
        self.image_size = np.uint32(uts.round_prop_to(
            np.float32([h * scale, w * scale])))

        self.scale = scale
        self.linewidth = linewidth
        self.colors = np.random.random((self.MAX_INST_NUM, 3)) * 255
 def __init__(self, args):
     self.dataset = data.ApolloScape(args)
     self._data_config = self.dataset.get_3d_car_config()
     self.load_car_models()
Ejemplo n.º 4
0
 def set_dataset(self, args):
     self.dataset = data.ApolloScape(args)
     self._data_config = self.dataset.get_3d_car_config()