(
reference,
samples,
metrics,
dataset,
results_path="results",
mmd_kitti=None
)
| 138 | |
| 139 | |
| 140 | def 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 | |
| 180 | def normalize_point_cloud(pc, method='sphere'): |
| 181 | """ |
no test coverage detected