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

AssertionError: please set score threshold (example: SHOW_SCORE_THRSHOLD = 0.00) in cfgs.py #50

Open
SumanthReddyKaliki opened this issue Nov 3, 2019 · 2 comments

Comments

@SumanthReddyKaliki
Copy link

Hi,
I'm trying to run the demo code and I followed all the step that you mentioned in the Markdown. But I keep on getting this error

python demo_rh.py --src_folder='/content/drive/My Drive/R2CNN-Plus-Plus/data/test/' --image_ext='.png' --des_folder='/content/drive/My Drive/R2CNN-Plus-Plus/output/' --save_res=False --gpu='0'

/content/drive/My Drive/R2CNN-Plus-Plus/tools
demo.py		 demo_rh.py	     eval.py		inference.py  train.py
demo_pyramid.py  demo_rh_pyramid.py  icdar2015_eval.py	__init__.py
WARNING:tensorflow:
The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
  * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
  * https://github.com/tensorflow/addons
  * https://github.com/tensorflow/io (for I/O related ops)
If you depend on functionality not listed there, please file an issue.

++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--
/content/drive/My Drive/R2CNN-Plus-Plus
WARNING:tensorflow:From ../libs/networks/mobilenet/mobilenet.py:356: The name tf.nn.avg_pool is deprecated. Please use tf.nn.avg_pool2d instead.

Traceback (most recent call last):
  File "demo_rh.py", line 380, in <module>
    200, 200, False)
  File "demo_rh.py", line 55, in inference
    'please set score threshold (example: SHOW_SCORE_THRSHOLD = 0.00) in cfgs.py'
AssertionError: please set score threshold (example: SHOW_SCORE_THRSHOLD = 0.00) in cfgs.py

But when I go and set the SHOW_SCORE_THRSHOLD to 0 in the cfgs.py I'm getting different error.

Traceback (most recent call last):
  File "demo_rh.py", line 380, in <module>
    200, 200, False)
  File "demo_rh.py", line 69, in inference
    mask_batch=None)
  File "../libs/networks/build_whole_network.py", line 311, in build_whole_detection_network
    feature_to_cropped, C4_attention_layer = self.build_base_network(input_img_batch)
  File "../libs/networks/build_whole_network.py", line 38, in build_base_network
    return resnet.resnet_base(input_img_batch, scope_name=self.base_network_name, is_training=self.is_training)
  File "../libs/networks/resnet.py", line 150, in resnet_base
    C4_attention_layer = build_attention(C4, is_training)
  File "../libs/networks/attention.py", line 178, in build_attention
    weights_initializer=cfgs.INITIALIZER,
NameError: name 'cfgs' is not defined
@HMCBSJ
Copy link

HMCBSJ commented Nov 5, 2019

I had a same problem and solved it by opening attention.py file then add "from libs.configs import cfgs "
for the error below, open cfgs file then set SHOW_SCORE_THRSHOLD under 0.005
AssertionError: please set score threshold (example: SHOW_SCORE_THRSHOLD = 0.00) in cfgs.py

@hopesala
Copy link

hopesala commented Sep 3, 2020

@HMCBSJ thanks you. it solved my same error.

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

3 participants