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

ModuleNotFoundError: No module named 'utils_box' #9

Open
allansdefreitas opened this issue Aug 5, 2022 · 2 comments
Open

ModuleNotFoundError: No module named 'utils_box' #9

allansdefreitas opened this issue Aug 5, 2022 · 2 comments

Comments

@allansdefreitas
Copy link

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?

@26th-Official
Copy link

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

@vodoanminhhieuvn
Copy link

vodoanminhhieuvn commented May 27, 2023

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants