-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathpm.py
More file actions
31 lines (23 loc) · 703 Bytes
/
pm.py
File metadata and controls
31 lines (23 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from __future__ import print_function
import argparse
import pandas as pd
from lib.config import cfg
from lib.dataset import FashionAIKPSDataSet
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--csv', type=str, default='./result/tmp_test_result.csv')
args = parser.parse_args()
print(args)
test = pd.read_csv(args.csv)
test = FashionAIKPSDataSet(test)
c = 0
for i in range(len(test)):
cate = test.category[i]
kps = test.kps[i]
landmark_idx = cfg.LANDMARK_IDX[cate]
for j in landmark_idx:
if kps[j, 2] == 0:
c += 1
print('missing points', c)
if __name__ == '__main__':
main()