PerspectiveFields
PerspectiveFields copied to clipboard
Errors when training.
Hi, thanks for your great work! I met an error when I was trying to train the PerspectiveNet:
python -W ignore train.py \
--config-file configs/config-mix-gsv-regress.yaml \
--num-gpus 1 \
--dist-url tcp://127.0.0.1:$((RANDOM +10000)) \
OUTPUT_DIR "./exp/step01-gsv-perspective-pretrain" \
SOLVER.IMS_PER_BATCH 64
Here's the error:
Traceback (most recent call last):
File "/home/xubo/.conda/envs/persp/lib/python3.10/site-packages/albumentations/core/validation.py", line 43, in _validate_parameters
config = schema_cls(**{k: v for k, v in full_kwargs.items() if k in param_names})
File "/home/xubo/.conda/envs/persp/lib/python3.10/site-packages/pydantic/main.py", line 214, in __init__
validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
pydantic_core._pydantic_core.ValidationError: 1 validation error for InitSchema
size
Field required [type=missing, input_value={'scale': (0.08, 1.0), 'r...rpolation': 0, 'p': 1.0}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.10/v/missing
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/xubo/workspace/code/vloc/PerspectiveFields/train.py", line 161, in <module>
launch(
File "/home/xubo/workspace/code/vloc/PerspectiveFields/detectron2/engine/launch.py", line 84, in launch
main_func(*args)
File "/home/xubo/workspace/code/vloc/PerspectiveFields/train.py", line 141, in main
trainer = Trainer(cfg)
File "/home/xubo/workspace/code/vloc/PerspectiveFields/detectron2/engine/defaults.py", line 412, in __init__
data_loader = self.build_train_loader(cfg)
File "/home/xubo/workspace/code/vloc/PerspectiveFields/train.py", line 79, in build_train_loader
cfg, mapper=PerspectiveMapper(cfg, True, dataset_names=dataset_names)
File "/home/xubo/workspace/code/vloc/PerspectiveFields/perspective2d/data/perspective_transforms.py", line 79, in __init__
self.init_aug()
File "/home/xubo/workspace/code/vloc/PerspectiveFields/perspective2d/data/perspective_transforms.py", line 675, in init_aug
A.RandomResizedCrop(
File "/home/xubo/.conda/envs/persp/lib/python3.10/site-packages/albumentations/core/validation.py", line 78, in custom_init
validated_kwargs = cls._validate_parameters(
File "/home/xubo/.conda/envs/persp/lib/python3.10/site-packages/albumentations/core/validation.py", line 47, in _validate_parameters
raise ValueError(str(e)) from e
ValueError: 1 validation error for InitSchema
size
Field required [type=missing, input_value={'scale': (0.08, 1.0), 'r...rpolation': 0, 'p': 1.0}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.10/v/missing
It looks like the problem is caused by the wrong albumentations version. Do you know how to solve this problem or can you provide more detailed package version information?