작성
·
314
0
import matplotlib
import matplotlib.pyplot as plt
import io
import scipy.misc
import numpy as np
from six import BytesIO
from PIL import Image, ImageDraw, ImageFont
import tensorflow as tf
from object_detection.utils import label_map_util
from object_detection.utils import config_util
from object_detection.utils import visualization_utils as viz_utils
from object_detection.builders import model_builder
%matplotlib inline
이것을 실행하니 아래와 같은 오류가 나옵니다. 어떤 점이 문제였을까요?
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-4-49156a41fe80> in <module>
13 from object_detection.utils import config_util
14 from object_detection.utils import visualization_utils as viz_utils
---> 15 from object_detection.builders import model_builder
16
17 get_ipython().run_line_magic('matplotlib', 'inline')
2 frames
/usr/local/lib/python3.7/dist-packages/object_detection/models/keras_models/resnet_v1.py in <module>
22 import tensorflow.compat.v1 as tf
23
---> 24 from tensorflow.python.keras.applications import resnet
25 from object_detection.core import freezable_batch_norm
26 from object_detection.models.keras_models import model_utils
ModuleNotFoundError: No module named 'tensorflow.python.keras.applications'
---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------
답변 1
0
안녕하세요~. 반갑습니다.
먼저 수강에 불편을 드려서 죄송합니다ㅠㅠ.
tensorflow 버전이 계속 업데이트되면서 tensorflow objectection api와 호환이 계속 바뀌네요ㅠㅠ.
2022년 11월 11일 기준으로 수정한 아래 colab으로 실습부탁드립니다.
https://colab.research.google.com/drive/1LIMGUFJtCWw3gdgWh3T2aorR4AwogyPS?usp=sharing
좋은 하루되세요~.
감사합니다.