MCPcopy Create free account
hub / github.com/QWTforGithub/T2LDM / evaluate

Function evaluate

eval/eval_utils.py:140–178  ·  view source on GitHub ↗
(
        reference,
        samples,
        metrics,
        dataset,
        results_path="results",
        mmd_kitti=None
)

Source from the content-addressed store, hash-verified

138
139
140def evaluate(
141 reference,
142 samples,
143 metrics,
144 dataset,
145 results_path="results",
146 mmd_kitti=None
147):
148
149 results = {}
150
151 if 'fsvd' in metrics:
152 fsvd = compute_fsvd(reference, samples, dataset, results_path)
153 results["FSVD"] = fsvd
154
155 if 'fpvd' in metrics:
156 fpvd = compute_fpvd(reference, samples, dataset, results_path)
157 results["FPVD"] = fpvd
158
159
160 # reconstruction
161 if 'cd' in metrics:
162 cd = compute_cd(reference, samples)
163 results["CD"] = cd
164
165 if 'emd' in metrics:
166 emd = compute_emd(reference, samples)
167 results["EMD"] = emd
168
169 # statistical
170 if 'jsd' in metrics:
171 jsd = compute_jsd(mmd_kitti, samples, dataset)
172 results["JSD"] = jsd
173
174 if 'mmd' in metrics:
175 mmd = compute_mmd(mmd_kitti, samples, dataset)
176 results["MMD"] = mmd
177
178 return results
179
180def normalize_point_cloud(pc, method='sphere'):
181 """

Callers 1

eval_resultsFunction · 0.85

Calls 6

compute_fsvdFunction · 0.85
compute_fpvdFunction · 0.85
compute_cdFunction · 0.85
compute_emdFunction · 0.85
compute_jsdFunction · 0.85
compute_mmdFunction · 0.85

Tested by

no test coverage detected