Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'EncoderDecoder' object has no attribute 'CLASSES' #1562

Closed
Htermotto opened this issue May 7, 2022 · 4 comments
Closed
Assignees

Comments

@Htermotto
Copy link

Htermotto commented May 7, 2022

Hi,

When trying to implement a new backbone into a segmentation class and run the inference on a single image as per the example notebook I get this error

AttributeError: 'EncoderDecoder' object has no attribute 'CLASSES'.

I believe this stems somehow from the BaseModule in mmcv not having it's classes set from the ../_base_/data/cityscapes.py folder, but I'm not sure how to fix this, or how this attribute CLASSES gets set in the EncoderDecoders that work. Some help or pointers to documentation would be appreciated.

EDIT: I'm including the link to the cityscapes.py base in my config file which then gets passed to init_segmentor similar to the other models.

Thanks!

@Htermotto
Copy link
Author

Htermotto commented May 7, 2022

Ah this needs to be set manually? I was able to get around my issues after doing so.

I referenced: https://github.com/open-mmlab/mmsegmentation/blob/master/tools/train.py#L226

@MengzhangLI
Copy link
Contributor

It is wired because I think you do not need to set classes of dataset manually if you have inherited cityscapes dataset config. It has been included in its dataset class. Could you debug whether dataset config parameters have been imported?

@Htermotto
Copy link
Author

Thanks for getting back to me so quickly!

What's the best way to see if whether the dataset config parameters have been imported? Where would I check that?

@MengzhangLI
Copy link
Contributor

Thanks for getting back to me so quickly!

What's the best way to see if whether the dataset config parameters have been imported? Where would I check that?

You can use PyCharm or VSCode to debug. Or check out log (in training) where config parameters are all recorded.

tianleiSHI added a commit to tianleiSHI/mmsegmentation that referenced this issue Dec 10, 2022
MeowZheng added a commit that referenced this issue Dec 12, 2022
CodeCamp #1562 [Doc] Add Chinese version of `overview.md`
MeowZheng pushed a commit to MeowZheng/mmsegmentation that referenced this issue Dec 30, 2022
…en-mmlab#2397)

* CodeCamp open-mmlab#1562 [Doc] update `overview.md`

* Update overview.md

* Update docs/zh_cn/overview.md

Co-authored-by: 谢昕辰 <xiexinch@outlook.com>

* Update docs/zh_cn/overview.md

Co-authored-by: 谢昕辰 <xiexinch@outlook.com>
MeowZheng pushed a commit to MeowZheng/mmsegmentation that referenced this issue Dec 30, 2022
…en-mmlab#2397)

* CodeCamp open-mmlab#1562 [Doc] update `overview.md`

* Update overview.md

* Update docs/zh_cn/overview.md

Co-authored-by: 谢昕辰 <xiexinch@outlook.com>

* Update docs/zh_cn/overview.md

Co-authored-by: 谢昕辰 <xiexinch@outlook.com>
MeowZheng pushed a commit that referenced this issue Dec 30, 2022
* CodeCamp #1562 [Doc] update `overview.md`

* Update overview.md

* Update docs/zh_cn/overview.md

Co-authored-by: 谢昕辰 <xiexinch@outlook.com>

* Update docs/zh_cn/overview.md

Co-authored-by: 谢昕辰 <xiexinch@outlook.com>
MeowZheng pushed a commit that referenced this issue Dec 30, 2022
* CodeCamp #1562 [Doc] update `overview.md`

* Update overview.md

* Update docs/zh_cn/overview.md

Co-authored-by: 谢昕辰 <xiexinch@outlook.com>

* Update docs/zh_cn/overview.md

Co-authored-by: 谢昕辰 <xiexinch@outlook.com>
xiexinch added a commit to xiexinch/mmsegmentation that referenced this issue Jan 29, 2023
wjkim81 pushed a commit to wjkim81/mmsegmentation that referenced this issue Dec 3, 2023
* support pckh on mpii

* support specific Metric class for MPII and Jhmdb

* update config

* fix incorrect keypoints transform in pipeline

* clean test codes

* fix minor diffs

* transformed_keypoints

* rollback transformed_keypoints and add orig_keypoints for metrc calculation

* add orig_keypoints in all datasets

* ori_keypoints

* fix the compatibility with mmcv and mmengine

* add ori_keypoints_visible

* move verified configs
nahidnazifi87 pushed a commit to nahidnazifi87/mmsegmentation_playground that referenced this issue Apr 5, 2024
…en-mmlab#2397)

* CodeCamp open-mmlab#1562 [Doc] update `overview.md`

* Update overview.md

* Update docs/zh_cn/overview.md

Co-authored-by: 谢昕辰 <xiexinch@outlook.com>

* Update docs/zh_cn/overview.md

Co-authored-by: 谢昕辰 <xiexinch@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants