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

关于Neck的问题 #1055

Closed
Lsz-20 opened this issue Nov 22, 2021 · 8 comments
Closed

关于Neck的问题 #1055

Lsz-20 opened this issue Nov 22, 2021 · 8 comments
Assignees

Comments

@Lsz-20
Copy link

Lsz-20 commented Nov 22, 2021

您好 我在尝试使用neck时发现报错:
KeyError:‘JPU’ is not in the {register}
KeyError:‘EncoderDecoder’ :‘JPU’ is not in the models register
我检查了mmseg/models/init.py中的文件,似乎在_all_中缺少了关于neck的引入?
感谢回复!

@MengzhangLI
Copy link
Contributor

Hi, could you use pip install -e . in your mmseg repo and try again?

The NECKS has been built here:

return NECKS.build(cfg)

@MengzhangLI MengzhangLI self-assigned this Nov 22, 2021
@Lsz-20
Copy link
Author

Lsz-20 commented Nov 22, 2021

Hi, could you use pip install -e . in your mmseg repo and try again?

The NECKS has been built here:

return NECKS.build(cfg)

感谢您的回复,我查看了mmseg/model/下的init以及builder文件,确认和官方的并无差异,其中init为:
image
其中没有NECK的对吗?

@MengzhangLI
Copy link
Contributor

Hi, could you use pip install -e . in your mmseg repo and try again?
The NECKS has been built here:

return NECKS.build(cfg)

感谢您的回复,我查看了mmseg/model/下的init以及builder文件,确认和官方的并无差异,其中init为: image 其中没有NECK的对吗?

Yep, actually I've checked my original repo re-implementing FastFCN, and it is the same as official code whose init does not have 'NECKS' in __all__.

@Lsz-20
Copy link
Author

Lsz-20 commented Nov 22, 2021

Yep, actually I've checked my original repo re-implementing FastFCN, and it is the same as official code whose init does not have 'NECKS' in __all__.

感谢您的回复~我重新安装了一下mmsegmentation,并检查了model/neck文件夹如下:
image
但似乎仍有以上错误?

@MengzhangLI
Copy link
Contributor

Yep, actually I've checked my original repo re-implementing FastFCN, and it is the same as official code whose init does not have 'NECKS' in __all__.

感谢您的回复~我重新安装了一下mmsegmentation,并检查了model/neck文件夹如下: image 但似乎仍有以上错误?

It is really wired. Can you write a detailed error report thus we could record it? Thanks!

@Lsz-20
Copy link
Author

Lsz-20 commented Nov 23, 2021

好的 感谢解答
报错如下:
Traceback (most recent call last):
File "/home/anaconda3/envs/py37_torch1.8/lib/python3.7/site-packages/mmcv/utils/registry.py", line 52, in build_from_cfg
return obj_cls(**args)
File "/home/lsz/Transformer/mmsegmentation/mmseg/models/segmentors/encoder_decoder.py", line 38, in init
self.neck = builder.build_neck(neck)
File "/home/lsz/Transformer/mmsegmentation/mmseg/models/builder.py", line 25, in build_neck
return NECKS.build(cfg)
File "/home/anaconda3/envs/py37_torch1.8/lib/python3.7/site-packages/mmcv/utils/registry.py", line 212, in build
return self.build_func(*args, **kwargs, registry=self)
File "/home/anaconda3/envs/py37_torch1.8/lib/python3.7/site-packages/mmcv/cnn/builder.py", line 27, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "/home/anaconda3/envs/py37_torch1.8/lib/python3.7/site-packages/mmcv/utils/registry.py", line 45, in build_from_cfg
f'{obj_type} is not in the {registry.name} registry')
KeyError: 'JPU is not in the models registry'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "tools/train.py", line 180, in
main()
File "tools/train.py", line 139, in main
test_cfg=cfg.get('test_cfg'))
File "/home/lsz/Transformer/mmsegmentation/mmseg/models/builder.py", line 49, in build_segmentor
cfg, default_args=dict(train_cfg=train_cfg, test_cfg=test_cfg))
File "/home/anaconda3/envs/py37_torch1.8/lib/python3.7/site-packages/mmcv/utils/registry.py", line 212, in build
return self.build_func(*args, **kwargs, registry=self)
File "/home/anaconda3/envs/py37_torch1.8/lib/python3.7/site-packages/mmcv/cnn/builder.py", line 27, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "/home/anaconda3/envs/py37_torch1.8/lib/python3.7/site-packages/mmcv/utils/registry.py", line 55, in build_from_cfg
raise type(e)(f'{obj_cls.name}: {e}')
KeyError: "EncoderDecoder: 'JPU is not in the models registry'"

感谢~

@Lsz-20
Copy link
Author

Lsz-20 commented Nov 23, 2021

It is really wired. Can you write a detailed error report thus we could record it? Thanks!
还有一个问题想要请教一下。看到您提供的neck是在fastfcn这个网络中使用的,请问其他网络(原先没有这个的)如果在configs文件中加入这个neck,是否可以正常使用呢?还是也会出现以上的‘JPU未被注册到模型中’的报错出现?
谢谢

@MengzhangLI
Copy link
Contributor

Hi, theoretically it should work if input/output channels are aligned.

Could you try to use our provided FastFCN models here to testify whether JPU could be used in MMSegmentation?

wjkim81 pushed a commit to wjkim81/mmsegmentation that referenced this issue Dec 3, 2023
* map location to cpu when load checkpoint (open-mmlab#1007)

* [Enhancement] Support minus output feature index in mobilenet_v3 (open-mmlab#1005)

* fix typo in mobilenet_v3

* fix typo in mobilenet_v3

* use -1 to indicate output tensors from final stage

* support negative out_indices

* [Enhancement] inference speed and flops tools. (open-mmlab#986)

* add the function to test the dummy forward speed of models.

* add tools to test the flops and inference speed of multiple models.

* [Fix] Update pose tracking demo to be compatible with latest mmtrakcing (open-mmlab#1014)

* update mmtracking demo

* support both track_bboxes and track_results

* add docstring

* [Fix] fix skeleton_info of coco wholebody dataset (open-mmlab#1010)

* fix wholebody base dataset

* fix lint

* fix lint

Co-authored-by: ly015 <liyining0712@gmail.com>

* [Feature] Add ViPNAS models for wholebody keypoint detection (open-mmlab#1009)

* add configs

* add dark configs

* add checkpoint and readme

* update webcam demo

* fix model path in webcam demo

* fix unittest

* [Fix] Fix bbox label visualization (open-mmlab#1020)

* update model metafiles (open-mmlab#1001)

* update hourglass ae .md (open-mmlab#1027)

* [Feature] Add ViPNAS mbv3 (open-mmlab#1025)

* add vipnas mbv3

* test other variants

* submission for mmpose

* add unittest

* add readme

* update .yml

* fix lint

* rebase

* fix pytest

Co-authored-by: jin-s13 <jinsheng13@foxmail.com>

* [Enhancement] Set a random seed when the user does not set a seed (open-mmlab#1030)

* fix randseed

* fix lint

* fix import

* fix isort

* update yapf hook

* revert yapf version

* add cfg file for flops and speed test,  change the bulid_posenet to init_pose_model and fix some typo in cfg (open-mmlab#1028)

* [Enhancement] Add more functions for speed test tool (open-mmlab#1034)

* add batch size and device args in speed test script, and remove MMDataParallel warper

* add vipnas_mbv3 model

* fix dead link (open-mmlab#1038)

* Skip CI when some specific files were changed (open-mmlab#1041)

* update sigmas (open-mmlab#1040)

* add more configs, ckpts and logs for HRNet on PoseTrack18 (open-mmlab#1035)

* [Feature] Add PoseWarper dataset (open-mmlab#1006)

* add PoseWarper dataset and base class

* modify pipelines related to video

* add unittest for PoseWarper dataset

* add unittest for evaluation function in posetrack18-realted dataset, and add some annotations json files

* fix typo

* fix unittest CI failure

* fix typo

* add PoseWarper dataset and base class

* modify pipelines related to video

* add unittest for PoseWarper dataset

* add unittest for evaluation function in posetrack18-realted dataset, and add some annotations json files

* fix typo

* fix unittest CI failure

* fix typo

* modify some methods in the base class to improve code coverage rate

* recover some mistakenly-deleted notes

* remove test_dataset_info part for the new TopDownPoseTrack18VideoDataset class

* cancel uncompleted previous runs (open-mmlab#1053)

* [Doc] Add inference speed results (open-mmlab#1044)

* add docs related to inference speed results

* add corresponding Chinese docs and fix some typos

* add Chinese docs in readthedocs

* remove the massive table in readme

* minor modification to wording

Co-authored-by: ly015 <liyining0712@gmail.com>

* [Feature] Add PoseWarper detector model (open-mmlab#932)

* Add top down video detector module

* Add PoseWarper neck

* add function _freeze_stages

* fix typo

* modify PoseWarper detector and PoseWarperNeck

* fix typo

* modify posewarper detector and neck

* Delete top_down_video.py

change the base class of `PoseWarper` detector from `TopDownVideo` to `TopDown`

* fix spell typo

* modify detector and neck

* add unittest for detector and neck

* modify unittest for posewarper forward

* Add top down video detector module

* Add PoseWarper neck

* add function _freeze_stages

* fix typo

* modify PoseWarper detector and PoseWarperNeck

* fix typo

* modify posewarper detector and neck

* Delete top_down_video.py

change the base class of `PoseWarper` detector from `TopDownVideo` to `TopDown`

* fix spell typo

* modify detector and neck

* add unittest for detector and neck

* modify unittest for posewarper forward

* modify dependency on mmcv version in posewarper neck

* reduce memory cost in test

* modify flops tool for more flexible input format

* Add top down video detector module

* Add PoseWarper neck

* add function _freeze_stages

* fix typo

* modify PoseWarper detector and PoseWarperNeck

* fix typo

* modify posewarper detector and neck

* Delete top_down_video.py

change the base class of `PoseWarper` detector from `TopDownVideo` to `TopDown`

* fix spell typo

* modify detector and neck

* add unittest for detector and neck

* modify unittest for posewarper forward

* Add PoseWarper neck

* modify PoseWarper detector and PoseWarperNeck

* modify posewarper detector and neck

* Delete top_down_video.py

change the base class of `PoseWarper` detector from `TopDownVideo` to `TopDown`

* fix spell typo

* modify detector and neck

* add unittest for detector and neck

* modify unittest for posewarper forward

* modify dependency on mmcv version in posewarper neck

* reduce memory cost in test

* modify flops tool for more flexible input format

* modify the posewarper detector description

* modify some arguments and related fields

* modify default values for some args

* fix readthedoc bulid typo

* fix ignore path (open-mmlab#1059)

* [Doc]  Add related docs for PoseWarper (open-mmlab#1036)

* add related docs for PoseWarper

* add related readme docs for posewarper

* modify related args in posewarper stage2 config

* modify posewarper stage2 config path

* add description about val_boxes path for data preparation (open-mmlab#1060)

* bump version to v0.21.0 (open-mmlab#1061)

* [Feature] Add ViPNAS_Mbv3 wholebody model (open-mmlab#1055)

* add vipnas mbv3 coco_wholebody

* add vipnas mbv3 coco_wholebody md&yml

* fix lint

Co-authored-by: ly015 <liyining0712@gmail.com>

Co-authored-by: Lumin <30328525+luminxu@users.noreply.github.com>
Co-authored-by: zengwang430521 <zengwang430521@gmail.com>
Co-authored-by: Jas <jinsheng@sensetime.com>
Co-authored-by: jin-s13 <jinsheng13@foxmail.com>
Co-authored-by: Qikai Li <87690686+liqikai9@users.noreply.github.com>
Co-authored-by: QwQ2000 <396707050@qq.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