-
Notifications
You must be signed in to change notification settings - Fork 48
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
The question about the 'first_stride' #73
Comments
Me too! |
I solved this problem severval days ago,'first_stride' means that the stride of the first Resnet block is the 'first_stride', but the newest detectron2 module does not have the attribute 'first_stride', so I modified the code in fsod_roi_heads.py. The function modified is _build_res5_block(self, cfg). The modified parts of code are attached.
…------------------ Original ------------------
From: ***@***.***>;
Date: Fri, Jul 21, 2023 08:16 PM
To: ***@***.***>;
Cc: ***@***.***>; ***@***.***>;
Subject: Re: [fanq15/FewX] The question about the 'first_stride' (Issue #73)
Me too!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
hello, I see you already solved this problem, but I can't look at the attached. |
Traceback (most recent call last):
File "E:/DetectionMethods/FewX/fsod_train_net.py", line 131, in
args=(args,),
File "D:\Conda3\envs\detectron2\lib\site-packages\detectron2\detectron2\engine\launch.py", line 82, in launch
main_func(*args)
File "E:/DetectionMethods/FewX/fsod_train_net.py", line 105, in main
model = Trainer.build_model(cfg)
File "D:\Conda3\envs\detectron2\lib\site-packages\detectron2\detectron2\engine\defaults.py", line 514, in build_model
model = build_model(cfg)
File "D:\Conda3\envs\detectron2\lib\site-packages\detectron2\detectron2\modeling\meta_arch\build.py", line 22, in build_model
model = META_ARCH_REGISTRY.get(meta_arch)(cfg)
File "E:\DetectionMethods\FewX\fewx\modeling\fsod\fsod_rcnn.py", line 50, in init
self.roi_heads = build_roi_heads(cfg, self.backbone.output_shape())
File "E:\DetectionMethods\FewX\fewx\modeling\fsod\fsod_roi_heads.py", line 44, in build_roi_heads
return ROI_HEADS_REGISTRY.get(name)(cfg, input_shape)
File "E:\DetectionMethods\FewX\fewx\modeling\fsod\fsod_roi_heads.py", line 75, in init
self.res5, out_channels = self._build_res5_block(cfg)
File "E:\DetectionMethods\FewX\fewx\modeling\fsod\fsod_roi_heads.py", line 102, in _build_res5_block
stride_in_1x1=stride_in_1x1,
File "D:\Conda3\envs\detectron2\lib\site-packages\detectron2\detectron2\modeling\backbone\resnet.py", line 610, in make_stage
return ResNet.make_stage(*args, **kwargs)
File "D:\Conda3\envs\detectron2\lib\site-packages\detectron2\detectron2\modeling\backbone\resnet.py", line 542, in make_stage
block_class(in_channels=in_channels, out_channels=out_channels, **curr_kwargs)
TypeError: init() got an unexpected keyword argument 'first_stride'
The text was updated successfully, but these errors were encountered: