mirror of https://github.com/PyRetri/PyRetri.git
49 lines
1.5 KiB
YAML
49 lines
1.5 KiB
YAML
# retrieval settings
|
|
|
|
datasets:
|
|
# number of images in a batch.
|
|
batch_size: 16
|
|
|
|
# function for stacking images in a batch.
|
|
collate_fn:
|
|
name: "CollateFn" # name of the collate_fn.
|
|
|
|
# function for loading images.
|
|
folder:
|
|
name: "Folder" # name of the folder.
|
|
|
|
# a list of data augmentation functions.
|
|
transformers:
|
|
names: ["ShorterResize", "CenterCrop", "ToCaffeTensor", "Normalize"] # names of transformers.
|
|
ShorterResize:
|
|
size: 256 # target size of the shorter edge.
|
|
CenterCrop:
|
|
size: 224 # target size of the crop img.
|
|
Normalize:
|
|
mean: [104, 116, 124]
|
|
std: [1.0, 1.0, 1.0]
|
|
|
|
model:
|
|
name: "vgg16" # name of the model.
|
|
vgg16:
|
|
load_checkpoint: "/data/places365_model/vgg16_hybrid1365.pt" # path of the model checkpoint, If it is started with "torchvision://", the model will be loaded from torchvision.
|
|
|
|
extract:
|
|
# way to assemble features if transformers produce multiple images (e.g. TwoFlip, TenCrop). 0 means concat these features and 1 means sum these features.
|
|
assemble: 0
|
|
|
|
# function for assigning output features.
|
|
extractor:
|
|
name: "VggSeries" # name of the extractor.
|
|
VggSeries:
|
|
extract_features: ["pool5"] # name of the output feature map. If it is ["all"], then all available features will be output.
|
|
|
|
# function for splitting the output features (e.g. PCB).
|
|
splitter:
|
|
name: "Identity" # name of the function for splitting features.
|
|
|
|
# a list of pooling functions.
|
|
aggregators:
|
|
names: ["GAP"] # names of aggregators.
|
|
|