Skip to content
TheChatArchiveThe Chat Archive
o1-preview-2024-09-12· OpenAIAi2 WildChat-4.8M (AI2)

for this repo "https://github.com/BloodAxe/xView3-The-First-Place-Solution/tree/master"…

  1. User

    for this repo "https://github.com/BloodAxe/xView3-The-First-Place-Solution/tree/master" training gives this error why? python train_multilabel.py +config=configs/multilabel_circle_net.yaml

    DEBUG:hydra.core.utils:Setting JobRuntime:name=UNKNOWN_NAME DEBUG:hydra.core.utils:Setting JobRuntime:name=train_multilabel Dataset valid_sar_cv ignore_low_confidence_detections False ignore_low_confidence_labels False filter_low_confidence_objects False Train dataset Unknown vessels 90 Unknown fishing 11242 Valid dataset Unknown vessels 20 Unknown fishing 2778 File "/Users/samerkharboush/Downloads/xView3-tested/train_multilabel.py", line 504, in main() File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/main.py", line 94, in decorated_main _run_hydra( File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/_internal/utils.py", line 394, in _run_hydra _run_app( File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/_internal/utils.py", line 457, in _run_app run_and_report( File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/_internal/utils.py", line 220, in run_and_report return func() File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/_internal/utils.py", line 458, in lambda: hydra.run( File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/_internal/hydra.py", line 119, in run ret = run_job( File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/core/utils.py", line 186, in run_job ret.return_value = task_function(task_cfg) File "/Users/samerkharboush/Downloads/xView3-tested/train_multilabel.py", line 500, in main CenternetPipeline(cfg).train() File "/Users/samerkharboush/Downloads/xView3-tested/train_multilabel.py", line 394, in train self.loaders, dataset_callbacks = self.build_loaders(config) File "/Users/samerkharboush/Downloads/xView3-tested/train_multilabel.py", line 369, in build_loaders train_ds, valid_ds, train_sampler, dataset_callbacks = self.build_datasets(config) File "/Users/samerkharboush/Downloads/xView3-tested/train_multilabel.py", line 119, in build_datasets [(key, A.Compose(build_augmentations([value]))) for key, value in config.augs.individual.items() if value is not None] File "/Users/samerkharboush/Downloads/xView3-tested/train_multilabel.py", line 119, in [(key, A.Compose(build_augmentations([value]))) for key, value in config.augs.individual.items() if value is not None] File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/albumentations/core/composition.py", line 259, in init super().init(transforms, p) File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/albumentations/core/composition.py", line 106, in init warnings.warn( File "/opt/anaconda3/envs/sam/lib/python3.9/warnings.py", line 109, in _showwarnmsg sw(msg.message, msg.category, msg.filename, msg.lineno, File "/Users/samerkharboush/Downloads/xView3-tested/train_multilabel.py", line 53, in warn_with_traceback traceback.print_stack(file=log) /opt/anaconda3/envs/sam/lib/python3.9/site-packages/albumentations/core/composition.py:259: UserWarning:

    transforms is single transform, but a sequence is expected! Transform will be wrapped into list.

    Preparing training dataset: 0%| | 0/35 [00:00<?, ?it/s]Warning: Could not locate shoreline_contours path for scene 758991708403f218v Warning: Could not locate shoreline_contours path for scene 7b7e837a7ac5a880v Warning: Could not locate shoreline_contours path for scene a1a21a222e244555v Warning: Could not locate shoreline_contours path for scene fc483682c621b54bv Warning: Could not locate shoreline_contours path for scene 13dd786ee6c95e06v Warning: Could not locate shoreline_contours path for scene 264ed833a13b7f2av Warning: Could not locate shoreline_contours path for scene 9a5aa7310c195f14v Warning: Could not locate shoreline_contours path for scene 2e80028071b89173v Warning: Could not locate shoreline_contours path for scene 335f9a411884e9cbv Warning: Could not locate shoreline_contours path for scene 39268d50efe8dae9v Warning: Could not locate shoreline_contours path for scene 9ea5029406691ce4v Warning: Could not locate shoreline_contours path for scene a6073537a4ea5fb9v Warning: Could not locate shoreline_contours path for scene cd4f6ff86f9f5991v Warning: Could not locate shoreline_contours path for scene e40c9251a4fce150v Warning: Could not locate shoreline_contours path for scene a9a58462f221a9eev Warning: Could not locate shoreline_contours path for scene c5ea6da5405bfac0v Warning: Could not locate shoreline_contours path for scene 5e9a2c1bcf179e9bv Warning: Could not locate shoreline_contours path for scene 94dca5e4de2edcf8v Warning: Could not locate shoreline_contours path for scene 9c418af4acd217d1v Warning: Could not locate shoreline_contours path for scene acf76647ba3f524bv Warning: Could not locate shoreline_contours path for scene c8bbfb37522617e9v Warning: Could not locate shoreline_contours path for scene cd36e75010a021f7v Warning: Could not locate shoreline_contours path for scene eeddcc0db3cff0d8v Warning: Could not locate shoreline_contours path for scene fc2f57371370c521v Warning: Could not locate shoreline_contours path for scene 0d8ed29b0760dc59v Warning: Could not locate shoreline_contours path for scene 36076e547370064ev Warning: Could not locate shoreline_contours path for scene 3fe00bf7beab8812v Warning: Could not locate shoreline_contours path for scene 487b4884f467c94av Warning: Could not locate shoreline_contours path for scene 8204efcfe9f09f94v Warning: Could not locate shoreline_contours path for scene f9eb760aaf6e798dv Warning: Could not locate shoreline_contours path for scene fe6a8d80fb5ebb8ev Warning: Could not locate shoreline_contours path for scene 0157baf3866b2cf9v Warning: Could not locate shoreline_contours path for scene 0e309957cef7bdc8v Warning: Could not locate shoreline_contours path for scene 65d6f6baee882077v Warning: Could not locate shoreline_contours path for scene 844545c005776fb1v Preparing training dataset: 100%|█████████████████████████████████████████████████████████████████| 35/35 [00:00<00:00, 1118.17it/s] Preparing validation dataset: 100%|██████████████████████████████████████████████████████████████████| 7/7 [00:00<00:00, 448.77it/s] Train instances 13933 dataset 35 sampler 8192 Valid instances 3655 dataset 1039 File "/Users/samerkharboush/Downloads/xView3-tested/train_multilabel.py", line 504, in main() File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/main.py", line 94, in decorated_main _run_hydra( File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/_internal/utils.py", line 394, in _run_hydra _run_app( File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/_internal/utils.py", line 457, in _run_app run_and_report( File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/_internal/utils.py", line 220, in run_and_report return func() File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/_internal/utils.py", line 458, in lambda: hydra.run( File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/_internal/hydra.py", line 119, in run ret = run_job( File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/core/utils.py", line 186, in run_job ret.return_value = task_function(task_cfg) File "/Users/samerkharboush/Downloads/xView3-tested/train_multilabel.py", line 500, in main CenternetPipeline(cfg).train() File "/Users/samerkharboush/Downloads/xView3-tested/train_multilabel.py", line 395, in train model = self.build_model(config, self.loaders) File "/Users/samerkharboush/Downloads/xView3-tested/train_multilabel.py", line 187, in build_model model = super().build_model(config) File "/Users/samerkharboush/Downloads/xView3-tested/xview3/pipeline.py", line 395, in build_model model = self.get_model(config["model"]) File "/Users/samerkharboush/Downloads/xView3-tested/train_multilabel.py", line 366, in get_model return instantiate(config, recursive=False) File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 226, in instantiate return instantiate_node( File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 347, in instantiate_node return _call_target(target, partial, args, kwargs, full_key) File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 92, in _call_target return target(*args, **kwargs) File "/Users/samerkharboush/Downloads/xView3-tested/xview3/centernet/models/centernet_unet.py", line 133, in from_config encoder = instantiate(encoder) File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 226, in instantiate return instantiate_node( File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 347, in instantiate_node return _call_target(target, partial, args, kwargs, full_key) File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 92, in _call_target return target(*args, **kwargs) File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/pytorch_toolbelt/modules/encoders/timm/efficient_net.py", line 200, in init encoder = tf_efficientnet_b5_ns( File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/timm/models/_registry.py", line 143, in _fn warnings.warn(f'Mapping deprecated model name {deprecated_name} to current {current_name}.', stacklevel=2) File "/opt/anaconda3/envs/sam/lib/python3.9/warnings.py", line 109, in _showwarnmsg sw(msg.message, msg.category, msg.filename, msg.lineno, File "/Users/samerkharboush/Downloads/xView3-tested/train_multilabel.py", line 53, in warn_with_traceback traceback.print_stack(file=log) /opt/anaconda3/envs/sam/lib/python3.9/site-packages/pytorch_toolbelt/modules/encoders/timm/efficient_net.py:200: UserWarning:

    Mapping deprecated model name tf_efficientnet_b5_ns to current tf_efficientnet_b5.ns_jft_in1k.

    [2024-09-20 16:50:19,359][timm.models._builder][INFO] - Loading pretrained weights from Hugging Face hub (timm/tf_efficientnet_b5.ns_jft_in1k) [2024-09-20 16:50:19,541][timm.models._hub][INFO] - [timm/tf_efficientnet_b5.ns_jft_in1k] Safe alternative available for 'pytorch_model.bin' (as 'model.safetensors'). Loading weights using safetensors. [2024-09-20 16:50:19,721][timm.models._builder][WARNING] - Unexpected keys (bn2.bias, bn2.num_batches_tracked, bn2.running_mean, bn2.running_var, bn2.weight, classifier.bias, classifier.weight, conv_head.weight) found while loading pretrained weights. This may be expected if model is being adapted. DEBUG:rasterio.session:Could not import boto3, continuing with reduced functionality. DEBUG:rasterio.session:Could not import boto3, continuing with reduced functionality. DEBUG:rasterio.session:Could not import boto3, continuing with reduced functionality. DEBUG:rasterio.session:Could not import boto3, continuing with reduced functionality. DEBUG:rasterio.env:Entering env context: <rasterio.env.Env object at 0x31bfd1610> DEBUG:rasterio.env:Starting outermost env DEBUG:rasterio.env:No GDAL environment exists DEBUG:rasterio.env:New GDAL environment <rasterio._env.GDALEnv object at 0x31bfd15e0> created DEBUG:rasterio.env:Entering env context: <rasterio.env.Env object at 0x33100f5e0> DEBUG:rasterio.env:Entering env context: <rasterio.env.Env object at 0x3327775e0> DEBUG:rasterio.env:Starting outermost env DEBUG:rasterio.env:Starting outermost env DEBUG:rasterio.env:No GDAL environment exists DEBUG:rasterio.env:No GDAL environment exists DEBUG:rasterio.env:New GDAL environment <rasterio._env.GDALEnv object at 0x3327775b0> created DEBUG:rasterio.env:New GDAL environment <rasterio._env.GDALEnv object at 0x33100f5b0> created DEBUG:rasterio.env:Entering env context: <rasterio.env.Env object at 0x3100d0520> DEBUG:rasterio.env:Starting outermost env DEBUG:rasterio.env:No GDAL environment exists DEBUG:rasterio.env:New GDAL environment <rasterio._env.GDALEnv object at 0x3100d04f0> created DEBUG:rasterio._filepath:Installing FilePath filesystem handler plugin... DEBUG:rasterio._filepath:Installing FilePath filesystem handler plugin... DEBUG:rasterio._env:GDAL_DATA found in environment. DEBUG:rasterio._env:GDAL_DATA found in environment. DEBUG:rasterio._env:PROJ_DATA found in environment. DEBUG:rasterio._env:PROJ_DATA found in environment. DEBUG:rasterio._filepath:Installing FilePath filesystem handler plugin... DEBUG:rasterio._env:GDAL_DATA found in environment. DEBUG:rasterio._env:Started GDALEnv: self=<rasterio._env.GDALEnv object at 0x33100f5b0>. DEBUG:rasterio._env:Started GDALEnv: self=<rasterio._env.GDALEnv object at 0x3327775b0>. DEBUG:rasterio._env:PROJ_DATA found in environment. DEBUG:rasterio.env:Entered env context: <rasterio.env.Env object at 0x33100f5e0> DEBUG:rasterio.env:Entered env context: <rasterio.env.Env object at 0x3327775e0> DEBUG:rasterio._env:Started GDALEnv: self=<rasterio._env.GDALEnv object at 0x31bfd15e0>. DEBUG:rasterio._base:Sharing flag: 0 DEBUG:rasterio._base:Sharing flag: 0 DEBUG:rasterio.env:Entered env context: <rasterio.env.Env object at 0x31bfd1610> DEBUG:rasterio._base:Sharing flag: 0 DEBUG:rasterio._filepath:Installing FilePath filesystem handler plugin... DEBUG:rasterio._env:GDAL_DATA found in environment. DEBUG:rasterio._env:PROJ_DATA found in environment. DEBUG:rasterio._env:Started GDALEnv: self=<rasterio._env.GDALEnv object at 0x3100d04f0>. DEBUG:rasterio.env:Entered env context: <rasterio.env.Env object at 0x3100d0520> DEBUG:rasterio._base:Sharing flag: 0 DEBUG:rasterio._base:Nodata success: 1, Nodata value: -32768.000000 DEBUG:rasterio._base:Nodata success: 1, Nodata value: -32768.000000 DEBUG:rasterio._base:Nodata success: 1, Nodata value: -32768.000000 DEBUG:rasterio._base:Dataset is started. DEBUG:rasterio.env:Exiting env context: <rasterio.env.Env object at 0x33100f5e0> DEBUG:rasterio.env:Cleared existing <rasterio._env.GDALEnv object at 0x33100f5b0> options DEBUG:rasterio._base:Dataset is started. DEBUG:rasterio._env:Stopped GDALEnv <rasterio._env.GDALEnv object at 0x33100f5b0>. DEBUG:rasterio.env:Exiting outermost env DEBUG:rasterio.env:Exited env context: <rasterio.env.Env object at 0x33100f5e0> DEBUG:rasterio.env:Exiting env context: <rasterio.env.Env object at 0x3100d0520> DEBUG:rasterio.env:Entering env context: <rasterio.env.Env object at 0x33100f520> DEBUG:rasterio.env:Cleared existing <rasterio._env.GDALEnv object at 0x3100d04f0> options DEBUG:rasterio.env:Starting outermost env DEBUG:rasterio._base:Dataset is started. DEBUG:rasterio._env:Stopped GDALEnv <rasterio._env.GDALEnv object at 0x3100d04f0>. DEBUG:rasterio.env:Exiting outermost env DEBUG:rasterio.env:No GDAL environment exists DEBUG:rasterio.env:Exited env context: <rasterio.env.Env object at 0x3100d0520> DEBUG:rasterio.env:New GDAL environment <rasterio._env.GDALEnv object at 0x33100f5b0> created DEBUG:rasterio.env:Entering env context: <rasterio.env.Env object at 0x3100d0460> DEBUG:rasterio.env:Starting outermost env DEBUG:rasterio.env:No GDAL environment exists DEBUG:rasterio.env:Exiting env context: <rasterio.env.Env object at 0x3327775e0> DEBUG:rasterio.env:New GDAL environment <rasterio._env.GDALEnv object at 0x3100d04f0> created DEBUG:rasterio._base:Nodata success: 1, Nodata value: -32768.000000 DEBUG:rasterio.env:Cleared existing <rasterio._env.GDALEnv object at 0x3327775b0> options DEBUG:rasterio._env:Stopped GDALEnv <rasterio._env.GDALEnv object at 0x3327775b0>. DEBUG:rasterio.env:Exiting outermost env DEBUG:rasterio.env:Exited env context: <rasterio.env.Env object at 0x3327775e0> DEBUG:rasterio.env:Entering env context: <rasterio.env.Env object at 0x332777520> DEBUG:rasterio.env:Starting outermost env DEBUG:rasterio.env:No GDAL environment exists DEBUG:rasterio._base:Dataset is started. DEBUG:rasterio.env:New GDAL environment <rasterio._env.GDALEnv object at 0x3327775b0> created DEBUG:rasterio._env:GDAL_DATA found in environment. DEBUG:rasterio._env:GDAL_DATA found in environment. DEBUG:rasterio.env:Exiting env context: <rasterio.env.Env object at 0x31bfd1610> DEBUG:rasterio._env:PROJ_DATA found in environment. DEBUG:rasterio._env:PROJ_DATA found in environment. DEBUG:rasterio.env:Cleared existing <rasterio._env.GDALEnv object at 0x31bfd15e0> options DEBUG:rasterio._env:Stopped GDALEnv <rasterio._env.GDALEnv object at 0x31bfd15e0>. DEBUG:rasterio.env:Exiting outermost env DEBUG:rasterio._env:Started GDALEnv: self=<rasterio._env.GDALEnv object at 0x33100f5b0>. DEBUG:rasterio.env:Exited env context: <rasterio.env.Env object at 0x31bfd1610> DEBUG:rasterio.env:Entered env context: <rasterio.env.Env object at 0x33100f520> DEBUG:rasterio.env:Entering env context: <rasterio.env.Env object at 0x31bfd1550> DEBUG:rasterio.env:Starting outermost env DEBUG:rasterio.env:No GDAL environment exists DEBUG:rasterio.env:New GDAL environment <rasterio._env.GDALEnv object at 0x31bfd15e0> created DEBUG:rasterio._io:Output nodata value read from file: -32768.0 DEBUG:rasterio._env:Started GDALEnv: self=<rasterio._env.GDALEnv object at 0x3100d04f0>. DEBUG:rasterio.env:Entered env context: <rasterio.env.Env object at 0x3100d0460> DEBUG:rasterio._io:Output nodata values: [-32768.0] DEBUG:rasterio._io:Output nodata value read from file: -32768.0 DEBUG:rasterio._env:GDAL_DATA found in environment. DEBUG:rasterio._env:PROJ_DATA found in environment. DEBUG:rasterio._io:Output nodata values: [-32768.0] DEBUG:rasterio._env:Started GDALEnv: self=<rasterio._env.GDALEnv object at 0x31bfd15e0>. DEBUG:rasterio.env:Entered env context: <rasterio.env.Env object at 0x31bfd1550> DEBUG:rasterio._env:GDAL_DATA found in environment. DEBUG:rasterio._env:PROJ_DATA found in environment. DEBUG:rasterio._env:Started GDALEnv: self=<rasterio._env.GDALEnv object at 0x3327775b0>. DEBUG:rasterio._io:Output nodata value read from file: -32768.0 DEBUG:rasterio.env:Entered env context: <rasterio.env.Env object at 0x332777520> DEBUG:rasterio._io:all_valid: False DEBUG:rasterio._io:all_valid: False DEBUG:rasterio._io:Output nodata values: [-32768.0] DEBUG:rasterio._io:mask_flags: ([<MaskFlags.nodata: 8>],) DEBUG:rasterio._io:mask_flags: ([<MaskFlags.nodata: 8>],) DEBUG:rasterio._io:Jump straight to _read() DEBUG:rasterio._io:Jump straight to _read() DEBUG:rasterio._io:Output nodata value read from file: -32768.0 DEBUG:rasterio._io:Window: Window(col_off=26659, row_off=14406, width=512, height=512) DEBUG:rasterio._io:Window: Window(col_off=23233, row_off=19830, width=512, height=512) DEBUG:rasterio._io:IO window xoff=26659.0 yoff=14406.0 width=512.0 height=512.0 DEBUG:rasterio._io:IO window xoff=23233.0 yoff=19830.0 width=512.0 height=512.0 DEBUG:rasterio._io:Output nodata values: [-32768.0] DEBUG:rasterio._io:all_valid: False DEBUG:rasterio._io:mask_flags: ([<MaskFlags.nodata: 8>],) DEBUG:rasterio._io:Jump straight to _read() DEBUG:rasterio._io:Window: Window(col_off=19656, row_off=13893, width=512, height=512) DEBUG:rasterio._io:all_valid: False DEBUG:rasterio._io:IO window xoff=19656.0 yoff=13893.0 width=512.0 height=512.0 DEBUG:rasterio._io:mask_flags: ([<MaskFlags.nodata: 8>],) DEBUG:rasterio._io:Jump straight to _read() DEBUG:rasterio._io:Window: Window(col_off=19142, row_off=8511, width=512, height=512) DEBUG:rasterio._io:IO window xoff=19142.0 yoff=8511.0 width=512.0 height=512.0 DEBUG:rasterio.env:Exiting env context: <rasterio.env.Env object at 0x33100f520> DEBUG:rasterio.env:Cleared existing <rasterio._env.GDALEnv object at 0x33100f5b0> options DEBUG:rasterio._env:Stopped GDALEnv <rasterio._env.GDALEnv object at 0x33100f5b0>. DEBUG:rasterio.env:Exiting outermost env DEBUG:rasterio.env:Exited env context: <rasterio.env.Env object at 0x33100f520> DEBUG:rasterio.env:Entering env context: <rasterio.env.Env object at 0x33100f520> DEBUG:rasterio.env:Starting outermost env DEBUG:rasterio.env:No GDAL environment exists DEBUG:rasterio.env:New GDAL environment <rasterio._env.GDALEnv object at 0x33100f550> created DEBUG:rasterio._env:GDAL_DATA found in environment. DEBUG:rasterio._env:PROJ_DATA found in environment. DEBUG:rasterio._env:Started GDALEnv: self=<rasterio._env.GDALEnv object at 0x33100f550>. DEBUG:rasterio.env:Entered env context: <rasterio.env.Env object at 0x33100f520> DEBUG:rasterio._base:Sharing flag: 0 DEBUG:rasterio.env:Exiting env context: <rasterio.env.Env object at 0x3100d0460> DEBUG:rasterio.env:Cleared existing <rasterio._env.GDALEnv object at 0x3100d04f0> options DEBUG:rasterio._env:Stopped GDALEnv <rasterio._env.GDALEnv object at 0x3100d04f0>. DEBUG:rasterio.env:Exiting outermost env DEBUG:rasterio.env:Exited env context: <rasterio.env.Env object at 0x3100d0460> DEBUG:rasterio.env:Entering env context: <rasterio.env.Env object at 0x3100d0460> DEBUG:rasterio.env:Starting outermost env DEBUG:rasterio.env:No GDAL environment exists DEBUG:rasterio.env:New GDAL environment <rasterio._env.GDALEnv object at 0x3100d0490> created DEBUG:rasterio._env:GDAL_DATA found in environment. DEBUG:rasterio._env:PROJ_DATA found in environment. DEBUG:rasterio._env:Started GDALEnv: self=<rasterio._env.GDALEnv object at 0x3100d0490>. DEBUG:rasterio.env:Entered env context: <rasterio.env.Env object at 0x3100d0460> DEBUG:rasterio._base:Sharing flag: 0 DEBUG:rasterio._base:Nodata success: 1, Nodata value: -32768.000000 DEBUG:rasterio._base:Dataset is started. DEBUG:rasterio.env:Exiting env context: <rasterio.env.Env object at 0x33100f520> DEBUG:rasterio.env:Cleared existing <rasterio._env.GDALEnv object at 0x33100f550> options DEBUG:rasterio._env:Stopped GDALEnv <rasterio._env.GDALEnv object at 0x33100f550>. DEBUG:rasterio.env:Exiting outermost env DEBUG:rasterio.env:Exited env context: <rasterio.env.Env object at 0x33100f520> DEBUG:rasterio.env:Entering env context: <rasterio.env.Env object at 0x33100f5e0> DEBUG:rasterio.env:Starting outermost env DEBUG:rasterio.env:No GDAL environment exists DEBUG:rasterio.env:New GDAL environment <rasterio._env.GDALEnv object at 0x33100f550> created DEBUG:rasterio._env:GDAL_DATA found in environment. DEBUG:rasterio._env:PROJ_DATA found in environment. DEBUG:rasterio._env:Started GDALEnv: self=<rasterio._env.GDALEnv object at 0x33100f550>. DEBUG:rasterio.env:Entered env context: <rasterio.env.Env object at 0x33100f5e0> DEBUG:rasterio._io:Output nodata value read from file: -32768.0 DEBUG:rasterio._io:Output nodata values: [-32768.0] DEBUG:rasterio._io:all_valid: False DEBUG:rasterio._io:mask_flags: ([<MaskFlags.nodata: 8>],) DEBUG:rasterio._io:Jump straight to _read() DEBUG:rasterio._io:Window: Window(col_off=23233, row_off=19830, width=512, height=512) DEBUG:rasterio._io:IO window xoff=23233.0 yoff=19830.0 width=512.0 height=512.0 DEBUG:rasterio.env:Exiting env context: <rasterio.env.Env object at 0x31bfd1550> DEBUG:rasterio.env:Cleared existing <rasterio._env.GDALEnv object at 0x31bfd15e0> options DEBUG:rasterio._env:Stopped GDALEnv <rasterio._env.GDALEnv object at 0x31bfd15e0>. DEBUG:rasterio.env:Exiting outermost env DEBUG:rasterio.env:Exited env context: <rasterio.env.Env object at 0x31bfd1550> DEBUG:rasterio._base:Nodata success: 1, Nodata value: -32768.000000 DEBUG:rasterio._base:Dataset is started. DEBUG:rasterio.env:Exiting env context: <rasterio.env.Env object at 0x3100d0460> DEBUG:rasterio.env:Cleared existing <rasterio._env.GDALEnv object at 0x3100d0490> options DEBUG:rasterio._env:Stopped GDALEnv <rasterio._env.GDALEnv object at 0x3100d0490>. DEBUG:rasterio.env:Exiting outermost env DEBUG:rasterio.env:Exited env context: <rasterio.env.Env object at 0x3100d0460> DEBUG:rasterio.env:Entering env context: <rasterio.env.Env object at 0x3100d0520> DEBUG:rasterio.env:Starting outermost env DEBUG:rasterio.env:No GDAL environment exists DEBUG:rasterio.env:New GDAL environment <rasterio._env.GDALEnv object at 0x3100d0490> created DEBUG:rasterio.env:Entering env context: <rasterio.env.Env object at 0x31bfd1550> DEBUG:rasterio.env:Starting outermost env DEBUG:rasterio.env:No GDAL environment exists DEBUG:rasterio.env:New GDAL environment <rasterio._env.GDALEnv object at 0x31bfd1580> created DEBUG:rasterio._env:GDAL_DATA found in environment. DEBUG:rasterio._env:PROJ_DATA found in environment. DEBUG:rasterio._env:GDAL_DATA found in environment. DEBUG:rasterio._env:PROJ_DATA found in environment. DEBUG:rasterio._env:Started GDALEnv: self=<rasterio._env.GDALEnv object at 0x3100d0490>. DEBUG:rasterio.env:Entered env context: <rasterio.env.Env object at 0x3100d0520> DEBUG:rasterio._env:Started GDALEnv: self=<rasterio._env.GDALEnv object at 0x31bfd1580>. DEBUG:rasterio._io:Output nodata value read from file: -32768.0 DEBUG:rasterio.env:Entered env context: <rasterio.env.Env object at 0x31bfd1550> DEBUG:rasterio._base:Sharing flag: 0 DEBUG:rasterio._io:Output nodata values: [-32768.0] DEBUG:rasterio._io:all_valid: False DEBUG:rasterio._io:mask_flags: ([<MaskFlags.nodata: 8>],) DEBUG:rasterio._io:Jump straight to _read() DEBUG:rasterio._io:Window: Window(col_off=26659, row_off=14406, width=512, height=512) DEBUG:rasterio._io:IO window xoff=26659.0 yoff=14406.0 width=512.0 height=512.0 DEBUG:rasterio.env:Exiting env context: <rasterio.env.Env object at 0x332777520> DEBUG:rasterio.env:Cleared existing <rasterio._env.GDALEnv object at 0x3327775b0> options DEBUG:rasterio._env:Stopped GDALEnv <rasterio._env.GDALEnv object at 0x3327775b0>. DEBUG:rasterio.env:Exiting outermost env DEBUG:rasterio.env:Exited env context: <rasterio.env.Env object at 0x332777520> DEBUG:rasterio.env:Entering env context: <rasterio.env.Env object at 0x332777520> DEBUG:rasterio.env:Starting outermost env DEBUG:rasterio.env:No GDAL environment exists DEBUG:rasterio.env:New GDAL environment <rasterio._env.GDALEnv object at 0x332777550> created DEBUG:rasterio._env:GDAL_DATA found in environment. DEBUG:rasterio._env:PROJ_DATA found in environment. DEBUG:rasterio._base:Nodata success: 1, Nodata value: -32768.000000 DEBUG:rasterio._env:Started GDALEnv: self=<rasterio._env.GDALEnv object at 0x332777550>. DEBUG:rasterio.env:Entered env context: <rasterio.env.Env object at 0x332777520> DEBUG:rasterio._base:Dataset is started. DEBUG:rasterio.env:Exiting env context: <rasterio.env.Env object at 0x31bfd1550> DEBUG:rasterio.env:Cleared existing <rasterio._env.GDALEnv object at 0x31bfd1580> options DEBUG:rasterio._env:Stopped GDALEnv <rasterio._env.GDALEnv object at 0x31bfd1580>. DEBUG:rasterio.env:Exiting outermost env DEBUG:rasterio.env:Exited env context: <rasterio.env.Env object at 0x31bfd1550> DEBUG:rasterio.env:Entering env context: <rasterio.env.Env object at 0x31bfd1610> DEBUG:rasterio.env:Starting outermost env DEBUG:rasterio._base:Sharing flag: 0 DEBUG:rasterio.env:No GDAL environment exists DEBUG:rasterio.env:New GDAL environment <rasterio._env.GDALEnv object at 0x31bfd1580> created DEBUG:rasterio._env:GDAL_DATA found in environment. DEBUG:rasterio._env:PROJ_DATA found in environment. DEBUG:rasterio._env:Started GDALEnv: self=<rasterio._env.GDALEnv object at 0x31bfd1580>. DEBUG:rasterio.env:Entered env context: <rasterio.env.Env object at 0x31bfd1610> DEBUG:rasterio._io:Output nodata value read from file: -32768.0 DEBUG:rasterio._io:Output nodata values: [-32768.0] DEBUG:rasterio._io:all_valid: False DEBUG:rasterio._io:mask_flags: ([<MaskFlags.nodata: 8>],) DEBUG:rasterio._io:Jump straight to _read() DEBUG:rasterio._io:Window: Window(col_off=19656, row_off=13893, width=512, height=512) DEBUG:rasterio._io:IO window xoff=19656.0 yoff=13893.0 width=512.0 height=512.0 DEBUG:rasterio._base:Nodata success: 1, Nodata value: -32768.000000 DEBUG:rasterio._base:Dataset is started. DEBUG:rasterio.env:Exiting env context: <rasterio.env.Env object at 0x332777520> DEBUG:rasterio.env:Cleared existing <rasterio._env.GDALEnv object at 0x332777550> options DEBUG:rasterio._env:Stopped GDALEnv <rasterio._env.GDALEnv object at 0x332777550>. DEBUG:rasterio.env:Exiting outermost env DEBUG:rasterio.env:Exited env context: <rasterio.env.Env object at 0x332777520> DEBUG:rasterio.env:Entering env context: <rasterio.env.Env object at 0x3327775e0> DEBUG:rasterio.env:Starting outermost env DEBUG:rasterio.env:No GDAL environment exists DEBUG:rasterio.env:New GDAL environment <rasterio._env.GDALEnv object at 0x332777550> created DEBUG:rasterio._env:GDAL_DATA found in environment. DEBUG:rasterio._env:PROJ_DATA found in environment. DEBUG:rasterio._env:Started GDALEnv: self=<rasterio._env.GDALEnv object at 0x332777550>. DEBUG:rasterio.env:Entered env context: <rasterio.env.Env object at 0x3327775e0> DEBUG:rasterio._io:Output nodata value read from file: -32768.0 DEBUG:rasterio._io:Output nodata values: [-32768.0] DEBUG:rasterio._io:all_valid: False DEBUG:rasterio._io:mask_flags: ([<MaskFlags.nodata: 8>],) DEBUG:rasterio._io:Jump straight to _read() DEBUG:rasterio._io:Window: Window(col_off=19142, row_off=8511, width=512, height=512) DEBUG:rasterio._io:IO window xoff=19142.0 yoff=8511.0 width=512.0 height=512.0 DEBUG:rasterio.env:Exiting env context: <rasterio.env.Env object at 0x33100f5e0> DEBUG:rasterio.env:Cleared existing <rasterio._env.GDALEnv object at 0x33100f550> options DEBUG:rasterio._env:Stopped GDALEnv <rasterio._env.GDALEnv object at 0x33100f550>. DEBUG:rasterio.env:Exiting outermost env DEBUG:rasterio.env:Exited env context: <rasterio.env.Env object at 0x33100f5e0> DEBUG:rasterio.env:Exiting env context: <rasterio.env.Env object at 0x3100d0520> DEBUG:rasterio.env:Cleared existing <rasterio._env.GDALEnv object at 0x3100d0490> options DEBUG:rasterio._env:Stopped GDALEnv <rasterio._env.GDALEnv object at 0x3100d0490>. DEBUG:rasterio.env:Exiting outermost env DEBUG:rasterio.env:Exited env context: <rasterio.env.Env object at 0x3100d0520> DEBUG:rasterio.env:Entering env context: <rasterio.env.Env object at 0x335347700> DEBUG:rasterio.env:Starting outermost env DEBUG:rasterio.env:No GDAL environment exists DEBUG:rasterio.env:New GDAL environment <rasterio._env.GDALEnv object at 0x335347c70> created DEBUG:rasterio._env:GDAL_DATA found in environment. DEBUG:rasterio._env:PROJ_DATA found in environment. DEBUG:rasterio._env:Started GDALEnv: self=<rasterio._env.GDALEnv object at 0x335347c70>. DEBUG:rasterio.env:Entered env context: <rasterio.env.Env object at 0x335347700> DEBUG:rasterio._base:Sharing flag: 0 DEBUG:rasterio.env:Entering env context: <rasterio.env.Env object at 0x314447eb0> DEBUG:rasterio.env:Starting outermost env DEBUG:rasterio.env:No GDAL environment exists DEBUG:rasterio.env:New GDAL environment <rasterio._env.GDALEnv object at 0x314447070> created DEBUG:rasterio._env:GDAL_DATA found in environment. DEBUG:rasterio._env:PROJ_DATA found in environment. DEBUG:rasterio._env:Started GDALEnv: self=<rasterio._env.GDALEnv object at 0x314447070>. DEBUG:rasterio.env:Entered env context: <rasterio.env.Env object at 0x314447eb0> DEBUG:rasterio._base:Sharing flag: 0 DEBUG:rasterio.env:Exiting env context: <rasterio.env.Env object at 0x31bfd1610> DEBUG:rasterio.env:Cleared existing <rasterio._env.GDALEnv object at 0x31bfd1580> options DEBUG:rasterio._env:Stopped GDALEnv <rasterio._env.GDALEnv object at 0x31bfd1580>. DEBUG:rasterio.env:Exiting outermost env DEBUG:rasterio.env:Exited env context: <rasterio.env.Env object at 0x31bfd1610> DEBUG:rasterio._base:Nodata success: 1, Nodata value: -32768.000000 DEBUG:rasterio._base:Dataset is started. DEBUG:rasterio.env:Exiting env context: <rasterio.env.Env object at 0x335347700> DEBUG:rasterio.env:Cleared existing <rasterio._env.GDALEnv object at 0x335347c70> options DEBUG:rasterio._env:Stopped GDALEnv <rasterio._env.GDALEnv object at 0x335347c70>. DEBUG:rasterio.env:Exiting outermost env DEBUG:rasterio.env:Exited env context: <rasterio.env.Env object at 0x335347700> DEBUG:rasterio.env:Entering env context: <rasterio.env.Env object at 0x3353475b0> DEBUG:rasterio.env:Starting outermost env DEBUG:rasterio.env:No GDAL environment exists DEBUG:rasterio.env:New GDAL environment <rasterio._env.GDALEnv object at 0x335347c70> created DEBUG:rasterio._env:GDAL_DATA found in environment. DEBUG:rasterio._env:PROJ_DATA found in environment. DEBUG:rasterio._env:Started GDALEnv: self=<rasterio._env.GDALEnv object at 0x335347c70>. DEBUG:rasterio.env:Entered env context: <rasterio.env.Env object at 0x3353475b0> DEBUG:rasterio._io:Output nodata value read from file: -32768.0 DEBUG:rasterio._io:Output nodata values: [-32768.0] DEBUG:rasterio._io:all_valid: False DEBUG:rasterio._io:mask_flags: ([<MaskFlags.nodata: 8>],) DEBUG:rasterio._io:Jump straight to _read() DEBUG:rasterio._io:Window: Window(col_off=6859, row_off=17797, width=512, height=512) DEBUG:rasterio._io:IO window xoff=6859.0 yoff=17797.0 width=512.0 height=512.0 DEBUG:rasterio._base:Nodata success: 1, Nodata value: -32768.000000 DEBUG:rasterio._base:Dataset is started. DEBUG:rasterio.env:Exiting env context: <rasterio.env.Env object at 0x314447eb0> DEBUG:rasterio.env:Cleared existing <rasterio._env.GDALEnv object at 0x314447070> options DEBUG:rasterio._env:Stopped GDALEnv <rasterio._env.GDALEnv object at 0x314447070>. DEBUG:rasterio.env:Exiting outermost env DEBUG:rasterio.env:Exited env context: <rasterio.env.Env object at 0x314447eb0> DEBUG:rasterio.env:Entering env context: <rasterio.env.Env object at 0x314463790> DEBUG:rasterio.env:Starting outermost env DEBUG:rasterio.env:No GDAL environment exists DEBUG:rasterio.env:New GDAL environment <rasterio._env.GDALEnv object at 0x314447070> created DEBUG:rasterio._env:GDAL_DATA found in environment. DEBUG:rasterio._env:PROJ_DATA found in environment. DEBUG:rasterio._env:Started GDALEnv: self=<rasterio._env.GDALEnv object at 0x314447070>. DEBUG:rasterio.env:Entered env context: <rasterio.env.Env object at 0x314463790> DEBUG:rasterio._io:Output nodata value read from file: -32768.0 DEBUG:rasterio._io:Output nodata values: [-32768.0] DEBUG:rasterio._io:all_valid: False DEBUG:rasterio._io:mask_flags: ([<MaskFlags.nodata: 8>],) DEBUG:rasterio._io:Jump straight to _read() DEBUG:rasterio._io:Window: Window(col_off=21063, row_off=11872, width=512, height=512) DEBUG:rasterio._io:IO window xoff=21063.0 yoff=11872.0 width=512.0 height=512.0 DEBUG:rasterio.env:Entering env context: <rasterio.env.Env object at 0x320324ca0> DEBUG:rasterio.env:Starting outermost env DEBUG:rasterio.env:No GDAL environment exists DEBUG:rasterio.env:New GDAL environment <rasterio._env.GDALEnv object at 0x320324820> created Error executing job with overrides: ['+config=configs/multilabel_circle_net.yaml'] DEBUG:rasterio._env:GDAL_DATA found in environment. DEBUG:rasterio._env:PROJ_DATA found in environment. DEBUG:rasterio.env:Exiting env context: <rasterio.env.Env object at 0x3327775e0> DEBUG:rasterio.env:Cleared existing <rasterio._env.GDALEnv object at 0x332777550> options DEBUG:rasterio._env:Stopped GDALEnv <rasterio._env.GDALEnv object at 0x332777550>. DEBUG:rasterio.env:Exiting outermost env DEBUG:rasterio.env:Exited env context: <rasterio.env.Env object at 0x3327775e0> DEBUG:rasterio._env:Started GDALEnv: self=<rasterio._env.GDALEnv object at 0x320324820>. DEBUG:rasterio.env:Entered env context: <rasterio.env.Env object at 0x320324ca0> DEBUG:rasterio._base:Sharing flag: 0 Traceback (most recent call last): File "/Users/samerkharboush/Downloads/xView3-tested/train_multilabel.py", line 504, in main() File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/main.py", line 94, in decorated_main _run_hydra( File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/_internal/utils.py", line 394, in _run_hydra _run_app( File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/_internal/utils.py", line 457, in _run_app run_and_report( File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/_internal/utils.py", line 223, in run_and_report raise ex File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/_internal/utils.py", line 220, in run_and_report return func() File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/_internal/utils.py", line 458, in lambda: hydra.run( File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/_internal/hydra.py", line 132, in run _ = ret.return_value File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/core/utils.py", line 260, in return_value raise self._return_value File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/hydra/core/utils.py", line 186, in run_job ret.return_value = task_function(task_cfg) File "/Users/samerkharboush/Downloads/xView3-tested/train_multilabel.py", line 500, in main CenternetPipeline(cfg).train() File "/Users/samerkharboush/Downloads/xView3-tested/train_multilabel.py", line 395, in train model = self.build_model(config, self.loaders) File "/Users/samerkharboush/Downloads/xView3-tested/train_multilabel.py", line 188, in build_model logger.debug(f"Train loader sample: {next(iter(loaders['train']))}") File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 630, in next data = self._next_data() File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1344, in _next_data return self._process_data(data) File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1370, in _process_data data.reraise() File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/torch/_utils.py", line 706, in reraise raise exception cv2.error: Caught error in DataLoader worker process 0. Original Traceback (most recent call last): File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/torch/utils/data/_utils/worker.py", line 309, in _worker_loop data = fetcher.fetch(index) # type: ignore[possibly-undefined] File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 52, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 52, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/Users/samerkharboush/Downloads/xView3-tested/xview3/dataset/random_crop_dataset.py", line 181, in getitem data = self.apply_transformations(targets) File "/Users/samerkharboush/Downloads/xView3-tested/xview3/dataset/keypoint_dataset.py", line 146, in apply_transformations data = self.transform( File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/albumentations/core/composition.py", line 337, in call data = t(**data) File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/albumentations/core/transforms_interface.py", line 118, in call return self.apply_with_params(params, **kwargs) File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/albumentations/core/transforms_interface.py", line 137, in apply_with_params result = target_function(np.require(arg, requirements=["C_CONTIGUOUS"]), **params) File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/albumentations/core/transforms_interface.py", line 364, in apply_to_mask return self.apply(mask, **{k: cv2.INTER_NEAREST if k == "interpolation" else v for k, v in params.items()}) File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/albumentations/augmentations/geometric/resize.py", line 279, in apply return fgeometric.resize(img, (self.height, self.width), interpolation=interpolation) File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/albucore/utils.py", line 120, in wrapped_function result = func(img, *args, **kwargs) File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/albumentations/augmentations/geometric/functional.py", line 384, in resize return resize_fn(img) File "/opt/anaconda3/envs/sam/lib/python3.9/site-packages/albucore/utils.py", line 93, in __process_fn return process_fn(img, **kwargs) cv2.error: OpenCV(4.10.0) :-1: error: (-5:Bad argument) in function 'resize'

    Overload resolution failed:

    • src data type = object is not supported
    • Expected Ptrcv::UMat for argument 'src'

    (sam) samerkharboush@Samers-MBP xView3-tested %

  2. Assistant

    Based on the error message you're receiving, the issue arises during the data transformation step, specifically when the cv2.resize function from OpenCV is called on an object of incorrect data type within the Albumentations library. The error message indicates that the source data type is "object," which is not supported by cv2.resize.

    Here's a condensed version of the critical part of the error message for clarity:

    cv2.error: OpenCV(4.10.0) :-1: error: (-5:Bad argument) in function 'resize'
    > Overload resolution failed:
    >  - src data type = object is not supported
    

    This error suggests that cv2.resize is being called with an array of data type object instead of a numerical data type (uint8, float32, etc.). In the context of image processing, this typically means that the image or mask data being passed to the function is not in the correct format.

    Possible Causes:

    1. Incorrect Data Type of Masks or Images: One of the masks or images being passed to the transformation pipeline may not be properly formatted as a NumPy array with a numerical data type.

    2. Incompatible Library Versions: There might be incompatibilities between the versions of OpenCV and Albumentations you're using. Specifically, newer versions of OpenCV (like 4.10.0) might not be fully compatible with the versions of Albumentations used in the repository you cloned.

    3. Missing Data or Preprocessing Steps: The warnings about missing shoreline_contours suggest that some expected data is missing, which could lead to empty or improperly formatted masks.

    Recommended Solution:

    1. Ensure Proper Data Formatting:

      • Check the masks and images being passed to the transform to ensure they're properly formatted NumPy arrays with appropriate numerical data types.
      • Add debugging statements to print out the data types and shapes of these arrays right before the transformation to identify any anomalies.
    2. Check for Missing Data:

      • Ensure that all required data, including shoreline_contours, is correctly placed and accessible to your script.
      • The warnings indicate that these files are missing for several scenes, which might be critical for the data pipeline.
    3. Downgrade OpenCV to a Compatible Version:

      • The error may be due to incompatibility between OpenCV 4.10.0 and the version of Albumentations used in the code.

      • Downgrade OpenCV to a version known to be compatible, such as 4.5.5, by running:

        pip install opencv-python==4.5.5.64
        
      • This version is more likely to be compatible with the Albumentations version expected by the repository.

    4. Match Library Versions with Repository Requirements:

      • Check if the repository provides a requirements.txt or environment.yml file specifying the required library versions.

      • Install the exact versions specified to ensure compatibility:

        pip install -r requirements.txt
        
      • If a specific version of Albumentations is required, ensure it is installed:

        pip install albumentations==<required_version>
        
      • You may need to adjust the versions of other libraries (like PyTorch, torchvision, etc.) to match those expected by the code.

    Additional Steps for Debugging:

    • Print Data Types Before Transformation:

      Insert print statements in the apply_transformations method in keypoint_dataset.py to output the data types and shapes of the images and masks:

      print(f"Image dtype: {img.dtype}, shape: {img.shape}")
      for i, mask in enumerate([hm_targets, h_bbox, w_bbox, keypoints_mask, class_labels, reg_targets]):
          print(f"Mask {i} dtype: {mask.dtype}, shape: {mask.shape}")
      
    • Verify Transformations:

      Ensure that the transformations applied are compatible with the data types of the images and masks.

    • Handling Missing Files:

      If certain data files are optional or can be missing, ensure that the code gracefully handles these cases without leading to incorrect data types.

    Conclusion:

    The error you're encountering is likely due to a data type mismatch caused by incompatibilities between the versions of OpenCV and Albumentations you're using and possibly exacerbated by missing data files. Downgrading OpenCV to a compatible version and ensuring all required data is available should resolve the issue.

    Example Commands to Fix the Issue:

    pip install opencv-python==4.5.5.64
    pip install albumentations==1.1.0  # Replace with the version required by the repository
    pip install -r requirements.txt    # Ensure all other dependencies are correctly installed
    

    After making these changes, try running your training command again.


    Note: Always make sure to use the versions of libraries specified by the repository or adjust the code to be compatible with newer versions if necessary.