Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The problem of the intersection of person ids betweem trainval and gallery #27

Closed
Burrocode opened this issue Apr 9, 2018 · 1 comment

Comments

@Burrocode
Copy link

Thank you for sharing the code!

when I write the codes as follow ,

if osp.exists(train_test_partition_file):
            train_test_partition = load_pickle(train_test_partition_file)
        else:
            raise RuntimeError("Train/test partition file should be provided.'") 
trainval_pids=set()
query_pids = set()
gallery_pids = set()
for im_type in ['detected','labeled']:
            trainval_im_names = train_test_partition[im_type]['train_im_names']
            query_im_names = train_test_partition[im_type]['query_im_names']
            gallery_im_names = train_test_partition[im_type]['gallery_im_names']
            
            trainval_pids.update(set([parse_im_name(n,'id') for n in trainval_im_names]))
            
            query_pids.update(set([parse_im_name(n,'id') for n in query_im_names]))
            gallery_pids.update(set([parse_im_name(n,'id') for n in gallery_im_names]))
           
        
print (trainval_pids & gallery_pids)
assert query_pids <= gallery_pids
assert trainval_pids.isdisjoint(gallery_pids)

It causes "AssertionError".
I find that there is an intersection between trainval and gallery. (set([1201, 1389]))
The training/testing partition file is “re_ranking_train_test_split.pkl” downloaded from the given link.
Looking forward for your reply, thank you.

@huanghoujing
Copy link
Owner

Thanks for attention. The problem is explained here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants