mmpretrain
mmpretrain copied to clipboard
[Feature] Add Google Landmark v2 retrieval dataset
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.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
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%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.