Image_manipulation_detection icon indicating copy to clipboard operation
Image_manipulation_detection copied to clipboard

'vgg16' object has no attribute '_anchor_target_layer'

Open i923002 opened this issue 6 years ago • 11 comments

how can i fix follow question?? File "C:\deep learning test\Image_manipulation_detection\lib\nets\vgg16.py", line 272, in build_proposals rpn_labels = self._anchor_target_layer(rpn_cls_score, "anchor") AttributeError: 'vgg16' object has no attribute '_anchor_target_layer'

i923002 avatar Nov 05 '18 15:11 i923002

Its been commented in the source, uncomment it. There are several other parts of the code commented out as well. You will have to check those too. That's how I got around this problem.

aradhyamathur avatar Nov 26 '18 06:11 aradhyamathur

the same error with upstairs

uulucky avatar Dec 20 '18 04:12 uulucky

File "train.py", line 86, in train 'vgg16' object has no attribute '_anchor_target_layer' I got the same error when i python train.py. how to fix it ?

andylulu avatar Feb 01 '19 08:02 andylulu

the same error with upstairs

hi Have you solved it?

andylulu avatar Feb 02 '19 01:02 andylulu

Its been commented in the source, uncomment it. There are several other parts of the code commented out as well. You will have to check those too. That's how I got around this problem.

But i uncommented all the "#" code ,it still throw the error?Could you give your revised "train.py" for my learning. Thanks

andylulu avatar Feb 02 '19 01:02 andylulu

The code haven't solved up to now. I tried to solve the issue about several months. But it still not to work. Who can help us to solve this problem?

andylulu [email protected] 於 2019年2月2日 週六 上午9:46寫道:

the same error with upstairs

hi Have you solved it?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LarryJiang134/Image_manipulation_detection/issues/3#issuecomment-459923309, or mute the thread https://github.com/notifications/unsubscribe-auth/AfJVPiJPZyocDSwGNSF_B9XtkJbsAQmUks5vJO4OgaJpZM4YOr0u .

i923002 avatar Feb 02 '19 02:02 i923002

Its been commented in the source, uncomment it. There are several other parts of the code commented out as well. You will have to check those too. That's how I got around this problem.

But i uncommented all the "#" code ,it still throw the error?Could you give your revised "train.py" for my learning. Thanks

Be careful!

  1. Uncomment _anchor_target_layer and _proposal_target_layer in /lib/nets/network.py
  2. Uncomment anchor_target_layer and proposal_target_layer in "lib/layer_utils/anchor_target_layer.py" and "/lib/layer_utils/proposal_target_layer.py" respectively.
  3. Uncomment the "import" part : in /lib/nets/network.py、/lib/layer_utils/anchor_target_layer.py and /lib/layer_utils/proposal_target_layer.py .

XinZhangRadar avatar Mar 13 '19 16:03 XinZhangRadar

After I fixed some codes, the network is training now, I have wrote a blog to record this process to help people to run the code successfully.

https://blog.csdn.net/weixin_43380510/article/details/88544830

XinZhangRadar avatar Mar 13 '19 17:03 XinZhangRadar

After I fixed some codes, the network is training now, I have wrote a blog to record this process to help people to run the code successfully.

https://blog.csdn.net/weixin_43380510/article/details/88544830

You saved my life

michaelyan-coupa avatar Jul 30 '19 22:07 michaelyan-coupa

you can clone my forked repo: https://github.com/abdullahalsaidi16/Image_manipulation_detection

abdullahalsaidi16 avatar Sep 12 '19 11:09 abdullahalsaidi16

In the paper, RGB stream alone predicts bbox more accurately, so you may wanna change that as well (also defined in vgg16.py) Have you changed this ? for accurate prediction, please pre-train noise stream's vgg weights on ImageNet and overwrite the trainable setting of noise stream after SRM conv layer How to do this ?

moulicm111 avatar Sep 13 '19 21:09 moulicm111