You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

deepfashion.py 1.9 kB

2 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # dataset settings
  2. dataset_type = 'DeepFashionDataset'
  3. data_root = 'data/DeepFashion/In-shop/'
  4. img_norm_cfg = dict(
  5. mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
  6. train_pipeline = [
  7. dict(type='LoadImageFromFile'),
  8. dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
  9. dict(type='Resize', img_scale=(750, 1101), keep_ratio=True),
  10. dict(type='RandomFlip', flip_ratio=0.5),
  11. dict(type='Normalize', **img_norm_cfg),
  12. dict(type='Pad', size_divisor=32),
  13. dict(type='DefaultFormatBundle'),
  14. dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels', 'gt_masks']),
  15. ]
  16. test_pipeline = [
  17. dict(type='LoadImageFromFile'),
  18. dict(
  19. type='MultiScaleFlipAug',
  20. img_scale=(750, 1101),
  21. flip=False,
  22. transforms=[
  23. dict(type='Resize', keep_ratio=True),
  24. dict(type='RandomFlip'),
  25. dict(type='Normalize', **img_norm_cfg),
  26. dict(type='Pad', size_divisor=32),
  27. dict(type='ImageToTensor', keys=['img']),
  28. dict(type='Collect', keys=['img']),
  29. ])
  30. ]
  31. data = dict(
  32. imgs_per_gpu=2,
  33. workers_per_gpu=1,
  34. train=dict(
  35. type=dataset_type,
  36. ann_file=data_root + 'annotations/DeepFashion_segmentation_query.json',
  37. img_prefix=data_root + 'Img/',
  38. pipeline=train_pipeline,
  39. data_root=data_root),
  40. val=dict(
  41. type=dataset_type,
  42. ann_file=data_root + 'annotations/DeepFashion_segmentation_query.json',
  43. img_prefix=data_root + 'Img/',
  44. pipeline=test_pipeline,
  45. data_root=data_root),
  46. test=dict(
  47. type=dataset_type,
  48. ann_file=data_root +
  49. 'annotations/DeepFashion_segmentation_gallery.json',
  50. img_prefix=data_root + 'Img/',
  51. pipeline=test_pipeline,
  52. data_root=data_root))
  53. evaluation = dict(interval=5, metric=['bbox', 'segm'])

No Description

Contributors (2)