Deep learning 名称错误:名称';SSD#U功能#U提取器#U类#U映射';没有定义
链接Roboflow: 我正在使用RobotFlow检测图像,但这是一个错误 我使用的系统要求: Ubuntu 20.04 张量流2 ssd_mobilenet_v2_fpnlite_640x640_coco17_tpu-8 命令代码我遇到了错误:Deep learning 名称错误:名称';SSD#U功能#U提取器#U类#U映射';没有定义,deep-learning,object-detection,solid-state-drive,mobilenet,Deep Learning,Object Detection,Solid State Drive,Mobilenet,链接Roboflow: 我正在使用RobotFlow检测图像,但这是一个错误 我使用的系统要求: Ubuntu 20.04 张量流2 ssd_mobilenet_v2_fpnlite_640x640_coco17_tpu-8 命令代码我遇到了错误: import pathlib filenames = list(pathlib.Path(work_dir + '/training/').glob('*.index')) filenames.sort() print(filenames)
import pathlib
filenames = list(pathlib.Path(work_dir + '/training/').glob('*.index'))
filenames.sort()
print(filenames)
#recover our saved model
pipeline_config = pipeline_file
#generally you want to put the last ckpt from training in here
model_dir = str(filenames[-1]).replace('.index','')
configs = config_util.get_configs_from_pipeline_file(pipeline_config)
model_config = configs['model']
detection_model = model_builder.build(
model_config=model_config, is_training=False)
# Restore checkpoint
ckpt = tf.compat.v2.train.Checkpoint(
model=detection_model)
ckpt.restore(os.path.join(str(filenames[-1]).replace('.index','')))
def get_model_detection_function(model):
"""Get a tf.function for detection."""
@tf.function
def detect_fn(image):
"""Detect objects in image."""
image, shapes = model.preprocess(image)
prediction_dict = model.predict(image, shapes)
detections = model.postprocess(prediction_dict, shapes)
return detections, prediction_dict, tf.reshape(shapes, [-1])
return detect_fn
detect_fn = get_model_detection_function(detection_model)
如何修复该漏洞?嗨,Thong,欢迎来到SO,请添加完整的回溯,以便人们能够提供帮助。