open-mmlab / mmsegmentation

OpenMMLab Semantic Segmentation Toolbox and Benchmark.
https://mmsegmentation.readthedocs.io/en/main/
Apache License 2.0
8.34k stars 2.63k forks source link

installation error #3163

Open Ljtyxhc opened 1 year ago

Ljtyxhc commented 1 year ago

by follow zhe instruction on website i install the pagkage success however,when i want to check whether it's right, some wrong happened

image image image

it reply that IndexError: list index out of range after using command

mim download mmsegmentation --config pspnet_r50-d8_4xb2-40k_cityscapes-512x1024 --dest .

i don't know what happened, the pip package was been installed

image
Ljtyxhc commented 1 year ago

by chinese: 简而言之就是安装的很成功,但是执行

mim download mmsegmentation --config pspnet_r50-d8_4xb2-40k_cityscapes-512x1024 --dest .

后就会弹出报错

image

实在不知道为什么

HePengguang commented 1 year ago

I met the same question, and also don't know how to sovle it. Please somebody helps us.

saedrna commented 1 year ago

Same issue.

saedrna commented 1 year ago

Seems to be related to the metadata of dsdl. I can successfully parse information until dpt but failed at dsdl. I attached the metadata.yaml for dsdl below.

Collections:
- Name: ''
  License: Apache License 2.0
  Metadata:
    Training Data: []
  Paper:
    Title: ''
    URL: ''
  README: configs/dsdl/README.md
  Frameworks:
  - PyTorch
Models: []

Here is some debug information before error. image

shallweiwei commented 1 year ago

I change the line value[0] to value,and it seems to work.

Ljtyxhc commented 1 year ago

I change the line value[0] to value,and it seems it works.

can you give some details? pls

shallweiwei commented 1 year ago

by follow zhe instruction on website i install the pagkage success however,when i want to check whether it's right, some wrong happened image image image it reply that IndexError: list index out of range after using command

mim download mmsegmentation --config pspnet_r50-d8_4xb2-40k_cityscapes-512x1024 --dest .

i don't know what happened, the pip package was been installed image

Open the line 339 in search.py,change this

        if isinstance(value[0], dict):  
 to
        if isinstance(value, dict):
Mayi-Keiji commented 1 year ago

@shallweiwei thanks, as your solution, it works, but can anybody describe why it happens ?

MauroGentile commented 1 year ago

I had the same and solved by changing isinstance(value[0],dict) to isinstance(value, dict) Not sure if this change may cause other errors....

zhangshaos commented 1 year ago

the same issue.

CristoZhang commented 1 year ago

You can check if value is empty before trying to access its elements. Like this:

elif isinstance(value, (list, tuple)):
    if value and isinstance(value[0], dict):
tusiyi commented 1 year ago

same issue

tusiyi commented 1 year ago

same issue

xiexinch commented 1 year ago

https://github.com/open-mmlab/mmsegmentation/pull/3194 Might try the latest dev-1.x branch..

dongdongtong commented 1 year ago

it works for me, thx!

STHxiao commented 1 year ago

same issue

xiexinch commented 1 year ago

A new version will be released to fix this issue.

ODAncona commented 1 year ago

Same issue...

What is the current workaround ?

Edit directly the file ? Switch to dev-1.x branch ?


Modifying the file /home/user/anaconda3/envs/openmmlab3.1/lib/python3.11/site-packages/mim/commands/search.py line 138. Did the work for me

elif isinstance(value, (list, tuple)):
    if value and isinstance(value[0], dict):
xiexinch commented 1 year ago

We release a new version MMSegmentation v1.1.1 to solve this problem. Feel free to create an issue to give us feedback if you have any new problems.