🚀 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!
When I run single_image_object_counting.py there is an error like this:
$ python single_image_object_counting.pyTraceback (most recent call last):File "single_image_object_counting.py", line 28, in <module>result = object_counting_api.single_image_object_counting(input_video, detection_graph, category_index, is_color_recognition_enabled, fps, width, height) # targeted objects countingFile "/root/tensorflow_object_counting_api/api/object_counting_api.py", line 469, in single_image_object_countingfeed_dict={image_tensor: image_np_expanded})File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 900, in run run_metadata_ptr)File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 1058, in _runraise RuntimeError('Attempted to use a closed Session.')RuntimeError: Attempted to use a closed Session.
When I run single_image_object_counting.py there is an error like this:
$ python single_image_object_counting.py
Traceback (most recent call last):
File "single_image_object_counting.py", line 28, in <module>
result = object_counting_api.single_image_object_counting(input_video, detection_graph, category_index, is_color_recognition_enabled, fps, width, height) # targeted objects counting
File "/root/tensorflow_object_counting_api/api/object_counting_api.py", line 469, in single_image_object_counting
feed_dict={image_tensor: image_np_expanded})
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 900, in run run_metadata_ptr)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 1058, in _run
raise RuntimeError('Attempted to use a closed Session.')
RuntimeError: Attempted to use a closed Session.
How to solve this?