Merge pull request #26 from Jiahao000/places205

update places205 linear classification config
This commit is contained in:
Xiaohang Zhan 2020-08-15 00:06:11 +08:00 committed by GitHub
commit d7eb74328e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 20 deletions

View File

@ -1,4 +1,4 @@
_base_ = '../../base.py'
_base_ = '../../../base.py'
# model settings
model = dict(
type='Classification',
@ -31,16 +31,11 @@ data_test_root = 'data/places205/val'
dataset_type = 'ClassificationDataset'
img_norm_cfg = dict(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
train_pipeline = [
dict(type='RandomResizedCrop', size=224),
dict(type='Resize', size=256),
dict(type='CenterCrop', size=256),
dict(type='RandomCrop', size=224),
dict(type='RandomHorizontalFlip'),
dict(
type='ColorJitter',
brightness=0.4,
contrast=0.4,
saturation=0.4,
hue=0.),
dict(type='ToTensor'),
dict(type='Lighting'),
dict(type='Normalize', **img_norm_cfg),
]
test_pipeline = [
@ -86,4 +81,4 @@ optimizer = dict(
lr_config = dict(policy='step', step=[30, 60, 90])
checkpoint_config = dict(interval=10)
# runtime settings
total_epochs = 90
total_epochs = 100

View File

@ -1,4 +1,4 @@
_base_ = '../../base.py'
_base_ = '../../../base.py'
# model settings
model = dict(
type='Classification',
@ -31,16 +31,11 @@ data_test_root = 'data/places205/val'
dataset_type = 'ClassificationDataset'
img_norm_cfg = dict(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
train_pipeline = [
dict(type='RandomResizedCrop', size=224),
dict(type='Resize', size=256),
dict(type='CenterCrop', size=256),
dict(type='RandomCrop', size=224),
dict(type='RandomHorizontalFlip'),
dict(
type='ColorJitter',
brightness=0.4,
contrast=0.4,
saturation=0.4,
hue=0.),
dict(type='ToTensor'),
dict(type='Lighting'),
dict(type='Normalize', **img_norm_cfg),
]
test_pipeline = [
@ -86,4 +81,4 @@ optimizer = dict(
lr_config = dict(policy='step', step=[30, 60, 90])
checkpoint_config = dict(interval=10)
# runtime settings
total_epochs = 90
total_epochs = 100

View File

@ -1,3 +1,4 @@
from .cifar import Cifar10, Cifar100
from .image_list import ImageList
from .imagenet import ImageNet
from .places205 import Places205

View File

@ -0,0 +1,10 @@
from ..registry import DATASOURCES
from .image_list import ImageList
@DATASOURCES.register_module
class Places205(ImageList):
def __init__(self, root, list_file, memcached, mclient_path):
super(Places205, self).__init__(
root, list_file, memcached, mclient_path)