D-FINE
D-FINE copied to clipboard
How to train images of size 1280?
I want to train the weights of images of size 1280 for comparison. In addition to changing 640 to 1280 in dataloader.yml, what else needs to be changed? For example:
collate_fn:
type: BatchImageCollateFuncion
scales: [480, 512, 544, 576, 608, 672, 704, 736, 768, 800]
scale_ori_repeat: 3
stop_epoch: 72 # epoch in [72, ~) stop
Do I need to add 1280 to scales in multiscales?
Similarly, does dfine_hgnetv2_x_custom.yml need to be modified?
The author missed 1 setting
Suppose I want to train for size 768,
-
In
D-FINE/configs/dfine/include/dfine_hgnetv2.yml,eval_spatial_size: [768, 768] # h w -
dataloader.yml
train_dataloader:
dataset:
transforms:
ops:
...
- {type: RandomZoomOut, fill: 0, p: 0}
- {type: Resize, size: [768, 768], } <-------
...
collate_fn:
type: BatchImageCollateFunction
base_size: 768 <-------
base_size_repeat: 3
stop_epoch: 72 # epoch in [72, ~) stop `multiscales`
...
val_dataloader:
dataset:
transforms:
ops:
- {type: Resize, size: [768, 768], } <-------
- {type: ConvertPILImage, dtype: 'float32', scale: True}
...
Also adjust batch size accordingly