MCPcopy Create free account
hub / github.com/Cicada000/VV / load_features

Method load_features

FaceRec.py:18–24  ·  view source on GitHub ↗

从NPZ文件加载预计算的特征向量

(self, features_file)

Source from the content-addressed store, hash-verified

16 self.load_features(features_file)
17
18 def load_features(self, features_file):
19 """从NPZ文件加载预计算的特征向量"""
20 print(f"Loading pre-computed features from {features_file}")
21 data = np.load(features_file)
22 self.known_face_encodings = data['encodings']
23 self.image_paths = data['image_paths']
24 print(f"Loaded {len(self.known_face_encodings)} face features")
25
26 def extract_face_encodings(self, image):
27 rgb_image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)

Callers 1

__init__Method · 0.95

Calls 1

loadMethod · 0.80

Tested by

no test coverage detected