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 training and test sets coincide #9

Open
12cyan opened this issue May 22, 2023 · 1 comment
Open

The training and test sets coincide #9

12cyan opened this issue May 22, 2023 · 1 comment

Comments

@12cyan
Copy link

12cyan commented May 22, 2023

For example, both test.txt and train.txt have the number 6

@waynamigo
Copy link

waynamigo commented May 26, 2023

I‘ve noticed that before. I suggest you can simply filtering the three types of index in dataloader.py with:

        trainfile = open('DIOR_RSVG/' +  'train.txt', "r").readlines()
        testfile  = open('DIOR_RSVG/' + 'test.txt', "r").readlines()
        valfile   = open('DIOR_RSVG/' + 'val.txt', "r").readlines()

        trainIndex = [int(index.strip('\n')) for index in trainfile]
        testIndex  = [int(index.strip('\n')) for index in testfile]
        valIndex   = [int(index.strip('\n')) for index in valfile]
        count = 0
        if self.split == "train":
            Index = trainIndex
        elif self.split == "val":
            Index = [i for i in valIndex if i not in trainIndex]
        elif self.split == "test":
            Index = [i for i in testIndex if i not in trainIndex + valIndex]

THEN You'll get 15328 samples for train, 2311 for validate, 10234 for test, which would be enough for verifying your own model. You can also do verification on RefCOCOunc, which is a representative dataset for VG task.

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