LarryJiang134 / Image_manipulation_detection

Paper: CVPR2018, Learning Rich Features for Image Manipulation Detection
MIT License
354 stars 97 forks source link

'vgg16' object has no attribute '_anchor_target_layer' #3

Open i923002 opened 5 years ago

i923002 commented 5 years ago

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'

aradhyamathur commented 5 years ago

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.

uulucky commented 5 years ago

the same error with upstairs

andylulu commented 5 years ago

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 commented 5 years ago

the same error with upstairs

hi Have you solved it?

andylulu commented 5 years ago

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

i923002 commented 5 years ago

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 notifications@github.com 於 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 .

XinZhangRadar commented 5 years ago

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 commented 5 years ago

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

michaelyan-coupa commented 5 years ago

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

abdullahalsaidi16 commented 5 years ago

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

moulicm111 commented 5 years ago

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 ?