ahmetozlu / tensorflow_object_counting_api

🚀 The TensorFlow Object Counting API is an open source framework built on top of TensorFlow and Keras that makes it easy to develop object counting systems!
https://www.youtube.com/watch?v=yT_1eKJTdfk
MIT License
1.32k stars 545 forks source link

single_image_counting error #63

Closed auliarananana closed 4 years ago

auliarananana commented 4 years ago

i have an error in single_image_counting , it is bug ? because i can run all code in repository Traceback (most recent call last): File "single_image_object_counting.py", line 21, in result = object_counting_api.single_image_object_counting(input_video, detection_graph, category_index, is_color_recognition_enabled) # targeted objects counting File "C:\tensorflow_object_counting_api-master\api\object_counting_api.py", line 511, in single_image_object_counting feed_dict={image_tensor: image_np_expanded}) File "C:\Users\USER\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\client\session.py", line 929, in run run_metadata_ptr) File "C:\Users\USER\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\client\session.py", line 1075, in _run raise RuntimeError('Attempted to use a closed Session.') RuntimeError: Attempted to use a closed Session.

AkilGoku commented 4 years ago

Am Getting the same error.

drojasug commented 4 years ago

Hey, it's an identation problem on the object_counting_api on lines (503,506,509) they should be inside "with tf.Session(graph=detection_graph) as Sess:". Ping me if you need help.