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

Fixed the compatibility problems caused by tensorflow2 version. #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion api/object_counting_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion real_time_counting_targeted_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion utils/backbone.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
4 changes: 3 additions & 1 deletion utils/label_map_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down