GoogleCloudPlatform / practical-ml-vision-book

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ModuleNotFoundError: No module named 'utils_box'

allansdefreitas opened this issue · comments

When I run the imports cell, this iimport error occurs:

CELL:

`import tensorflow as tf
import numpy as np
import concurrent.futures
from threading import Lock
import json, math, random, os, pprint
from matplotlib import pyplot as plt
import matplotlib as mpl
import utils_box as box
#import box_ops as box
AUTO = tf.data.AUTOTUNE
pp = pprint.PrettyPrinter()
print("TensorFlow version", tf.version)

from tensorflow_models.vision import box_ops as boxutils`

ERROR:

`ModuleNotFoundError Traceback (most recent call last)
in ()
6 from matplotlib import pyplot as plt
7 import matplotlib as mpl
----> 8 import utils_box as box
9 #import box_ops as box
10 AUTO = tf.data.AUTOTUNE

ModuleNotFoundError: No module named 'utils_box'

Is there any other package able to replace this one?

Yeah, Same here. Can anyone tell me what to do?

You can find utils_box.py in Chapter 4 folder or you can replace the usage of utils_box for box.scale_rois with this function.

def scale_rois(boxes, image_size):
  return tf.concat([
      boxes[:, :2] * tf.expand_dims(image_size, axis=0),
      boxes[:, 2:] * tf.expand_dims(image_size, axis=0)
  ], axis=1)