Open Harshitha-narayan opened 1 year ago
the same problem,how to solve it?
I have the same problem too. Waiting for some help in this thread.
EDIT: I tried reading the python files, and it has something to do with the 'inputs' key. I think this has something to do with loading the input data.
My dataset structure is:
> dataset
> |
> | coco
>
> |
> | train
> | 1.jpg
> ........
> train.json
> test
> | 1***.jpg
> ........
> test.json
> val
> | 1****.jpg
> ........
> val.json
Any insight would be very much appreciated
Maybe your data_loader error, you can check weather it in cludepipeline=train_pipeline,
in dataset
Maybe your data_loader error, you can check weather it in clude
pipeline=train_pipeline,
in dataset thanks so much, that key for me to solve stuck
same problem
same error. and I add test_mode=True, pipeline=test_pipeline, backend_args=backend_args
in dataset
of test_dataloader
, then solved it.
add 'LoadFromFile' to your conifg
相应的配置模型配置文件出错了,可以重新生成模型配置文件 我在运行test.py出现这个错误, 修改test对应得pipeline解决 pipeline修改前 pipeline=[ dict(backend_args=None, type='LoadImageFromFile'), dict(type='LoadAnnotations', with_bbox=True), ],
pipeline修改后
修改后
pipeline=[
dict(backend_args=None, type='LoadImageFromFile'),
dict(keep_ratio=True, scale=(
800,
500,
), type='Resize'),
dict(type='LoadAnnotations', with_bbox=True),
dict(
meta_keys=(
'img_id',
'img_path',
'ori_shape',
'img_shape',
'scale_factor',
),
type='PackDetInputs'),
],
pipeline add dict(type="PackInputs") and save this error
same error, I solved this by adding "dict(type='PackDetInputs')" to the last line of train_pipeline.
Thanks for your error report and we appreciate it a lot.
Checklist
Describe the bug I have written custom model on training mmdetection model. When I try training the model on custom data, I'm getting this error. _batch_inputs = data['inputs'] KeyError: 'inputs'
Reproduction
Environment
python mmdet/utils/collect_env.py
to collect necessary environment information and paste it here. sys.platform: win32 Python: 3.8.16 (default, Mar 2 2023, 03:18:16) [MSC v.1916 64 bit (AMD64)] CUDA available: True numpy_random_seed: 2147483648 GPU 0: GeForce RTX 2070 CUDA_HOME: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2 NVCC: Cuda compilation tools, release 11.2, V11.2.67 MSVC: Microsoft (R) C/C++ Optimizing Compiler Version 19.36.32532 for x64 GCC: n/a PyTorch: 1.11.0+cu113 PyTorch compiling details: PyTorch built with:TorchVision: 0.12.0+cu113 OpenCV: 4.7.0 MMEngine: 0.7.4 MMDetection: 3.0.0+ecac3a7
$PATH
,$LD_LIBRARY_PATH
,$PYTHONPATH
, etc.)Error traceback If applicable, paste the error trackback here.
Bug fix If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!