MCPcopy Create free account
hub / github.com/InternRobotics/P3Former / __init__

Method __init__

datasets/transforms/transforms_3d.py:253–273  ·  view source on GitHub ↗
(self,
                 num_areas: List[int],
                 pitch_angles: Sequence[float],
                 pre_transform: Optional[Sequence[dict]] = None,
                 prob: float = 1.0)

Source from the content-addressed store, hash-verified

251 """
252
253 def __init__(self,
254 num_areas: List[int],
255 pitch_angles: Sequence[float],
256 pre_transform: Optional[Sequence[dict]] = None,
257 prob: float = 1.0) -> None:
258 assert is_list_of(num_areas, int), \
259 'num_areas should be a list of int.'
260 self.num_areas = num_areas
261
262 assert len(pitch_angles) == 2, \
263 'The length of pitch_angles should be 2, ' \
264 f'but got {len(pitch_angles)}.'
265 assert pitch_angles[1] > pitch_angles[0], \
266 'pitch_angles[1] should be larger than pitch_angles[0].'
267 self.pitch_angles = pitch_angles
268
269 self.prob = prob
270 if pre_transform is None:
271 self.pre_transform = None
272 else:
273 self.pre_transform = Compose(pre_transform)
274
275 def laser_mix_transform(self, input_dict: dict, mix_results: dict) -> dict:
276 """LaserMix transform function.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected