diff --git a/api/object_counting_api.py b/api/object_counting_api.py index 51a6e85..43c6195 100755 --- a/api/object_counting_api.py +++ b/api/object_counting_api.py @@ -4,7 +4,9 @@ #--- Date : 27th January 2018 #---------------------------------------------- -import tensorflow as tf +import tensorflow.compat.v1 as tf +tf.disable_v2_behavior() + import csv import cv2 import numpy as np diff --git a/real_time_counting_targeted_object.py b/real_time_counting_targeted_object.py index f475b0c..80eb414 100755 --- a/real_time_counting_targeted_object.py +++ b/real_time_counting_targeted_object.py @@ -5,7 +5,8 @@ #---------------------------------------------- # Imports -import tensorflow as tf +import tensorflow.compat.v1 as tf +tf.disable_v2_behavior() # Object detection imports from utils import backbone diff --git a/utils/backbone.py b/utils/backbone.py index 2ab0089..be77b09 100755 --- a/utils/backbone.py +++ b/utils/backbone.py @@ -1,5 +1,7 @@ import glob, os, tarfile, urllib -import tensorflow as tf +import tensorflow.compat.v1 as tf +tf.disable_v2_behavior() + from utils import label_map_util def set_model(model_name, label_name): diff --git a/utils/label_map_util.py b/utils/label_map_util.py index 709c86a..0d24f38 100755 --- a/utils/label_map_util.py +++ b/utils/label_map_util.py @@ -17,7 +17,9 @@ import logging -import tensorflow as tf +import tensorflow.compat.v1 as tf +tf.disable_v2_behavior() + from google.protobuf import text_format from protos import string_int_label_map_pb2