Skip to content

[Feature] Add Google Landmark v2 retrieval dataset#1056

Open
zzc98 wants to merge 2 commits intoopen-mmlab:dev-1.xfrom
zzc98:add-gldv2
Open

[Feature] Add Google Landmark v2 retrieval dataset#1056
zzc98 wants to merge 2 commits intoopen-mmlab:dev-1.xfrom
zzc98:add-gldv2

Conversation

@zzc98
Copy link
Copy Markdown
Contributor

@zzc98 zzc98 commented Sep 26, 2022

Motivation

Support Google Landmark v2 retrieval dataset in 2019.

Use cases

train_pipeline = [
    dict(type='LoadImageFromFile'),
    dict(type='Resize', scale=384),
    dict(type='RandomCrop', crop_size=336),
    dict(type='RandomFlip', prob=0.5, direction='horizontal'),
    dict(type='PackClsInputs'),
]

test_pipeline = [
    dict(type='LoadImageFromFile'),
    dict(type='Resize', scale=384),
    dict(type='CenterCrop', crop_size=336),
    dict(type='PackClsInputs')
]

val_pipeline = test_pipeline
data_root = 'data/google-landmark/'
ann_prefix = 'data/google-landmark/metadata'
batch = 64

train_dataloader = dict(
    batch_size=batch,
    num_workers=4,
    dataset=dict(
        type=dataset_type,
        data_root=data_root,
        mode='train',
        train_set='clean', # 'clean' or 'full'
        anno_prefix=ann_prefix,
        pipeline=train_pipeline),
    sampler=dict(type='DefaultSampler', shuffle=True),
    persistent_workers=True
)

test_dataloader = dict(
    batch_size=batch,
    num_workers=4,
    dataset=dict(
        type=dataset_type,
        data_root=data_root,
        anno_prefix=ann_prefix,
        mode='test',
        test_set='public', # 'public', 'private' or 'full'
        pipeline=test_pipeline),
    sampler=dict(type='DefaultSampler', shuffle=False),
    persistent_workers=True
)

val_dataloader = test_dataloader

gallery_dataloader = dict(
    batch_size=batch,
    num_workers=4,
    dataset=dict(
        type=dataset_type,
        data_root=data_root,
        mode='index',
        anno_prefix=ann_prefix,
        pipeline=val_pipeline
    ),
    sampler=dict(type='DefaultSampler', shuffle=False))

Checklist

Before PR:

  • Pre-commit or other linting tools are used to fix the potential lint issues.
  • Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests.
  • The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  • The documentation has been modified accordingly, like docstring or example tutorials.

After PR:

  • If the modification has potential influence on downstream or other related projects, this PR should be tested with those projects, like MMDet or MMSeg.
  • CLA has been signed and all committers have signed the CLA in this PR.

@zzc98 zzc98 changed the title Add gldv2 # [Feature] Add Google Landmark v2 retrieval dataset Sep 26, 2022
@zzc98 zzc98 changed the title # [Feature] Add Google Landmark v2 retrieval dataset [Feature] Add Google Landmark v2 retrieval dataset Sep 26, 2022
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 26, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.68%. Comparing base (b8b31e9) to head (9b85f73).
Report is 156 commits behind head on dev-1.x.

Additional details and impacted files
@@             Coverage Diff              @@
##           dev-1.x    #1056       +/-   ##
============================================
+ Coverage     0.02%   91.68%   +91.65%     
============================================
  Files          121      128        +7     
  Lines         8217     9592     +1375     
  Branches      1368     1604      +236     
============================================
+ Hits             2     8794     +8792     
+ Misses        8215      618     -7597     
- Partials         0      180      +180     
Flag Coverage Δ
unittests 91.68% <100.00%> (+91.65%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it 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

Successfully merging this pull request may close these issues.

1 participant