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

Question about dataset #24

Closed
Rayoll opened this issue Jan 9, 2022 · 5 comments
Closed

Question about dataset #24

Rayoll opened this issue Jan 9, 2022 · 5 comments

Comments

@Rayoll
Copy link

Rayoll commented Jan 9, 2022

If I have an image classification dataset, how could I get the onehot label of each image for retrieval?

@swuxyj
Copy link
Owner

swuxyj commented Jan 10, 2022

I hope code1code2code3 can help you.

@uniartisan
Copy link

I hope code1code2code3 can help you.

Thanks a lot, it really help.
Could you please tell me what does database.txt do in training the network :)

@swuxyj
Copy link
Owner

swuxyj commented Jan 21, 2022

I hope code1code2code3 can help you.

Thanks a lot, it really help. Could you please tell me what does database.txt do in training the network :)

训练的时候只用了:train_loader
test_loader, dataset_loader 在算mAP的时候用的:

            tst_binary, tst_label = compute_result(test_loader, net, device=device)

            # print("calculating dataset binary code.......")\
            trn_binary, trn_label = compute_result(dataset_loader, net, device=device)

            # print("calculating map.......")
            mAP = CalcTopMap(trn_binary.numpy(), tst_binary.numpy(), trn_label.numpy(), tst_label.numpy(),
                             config["topK"])

@BigBoomDream
Copy link

hi, thank you very much for your work, the database.txt test.txt and train.txt of cifar10 in data is not given

@swuxyj
Copy link
Owner

swuxyj commented Jan 24, 2022

hi, thank you very much for your work, the database.txt test.txt and train.txt of cifar10 in data is not given

You can get the cifar10 dataset by import torchvision.datasets, and then directly divide it in multiple ways. You can refer to the code, of course, You can also generate these files yourself.

@swuxyj swuxyj closed this as completed Apr 8, 2022
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

4 participants