DiffuSynth / metrics /P_C_T.py
WeixuanYuan's picture
Upload 8 files
1ecb721 verified
raw
history blame contribute delete
425 Bytes
import numpy as np
from metrics.precision_recall import knn_precision_recall_features
# 生成样本
real_features = np.random.normal(0, 1, size=(1600, 512))
generated_features = np.random.normal(0, 1, size=(1600, 512))
state = knn_precision_recall_features(real_features, generated_features, nhood_sizes=[1, 2, 3, 4, 5, 10],
row_batch_size=16, col_batch_size=16)
print(state)