MCPcopy Create free account
hub / github.com/openai/point-e / FeatureExtractor

Class FeatureExtractor

point_e/evals/feature_extractor.py:21–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19
20
21class FeatureExtractor(ABC):
22 @property
23 @abstractmethod
24 def supports_predictions(self) -> bool:
25 pass
26
27 @property
28 @abstractmethod
29 def feature_dim(self) -> int:
30 pass
31
32 @property
33 @abstractmethod
34 def num_classes(self) -> int:
35 pass
36
37 @abstractmethod
38 def features_and_preds(self, streamer: NpzStreamer) -> Tuple[np.ndarray, np.ndarray]:
39 """
40 For a stream of point cloud batches, compute feature vectors and class
41 predictions.
42
43 :param point_clouds: a streamer for a sample batch. Typically, arr_0
44 will contain the XYZ coordinates.
45 :return: a tuple (features, predictions)
46 - features: a [B x feature_dim] array of feature vectors.
47 - predictions: a [B x num_classes] array of probabilities.
48 """
49
50
51class PointNetClassifier(FeatureExtractor):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected