We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ValueError: Tensor Tensor("lambda_1/map/TensorArrayStack/TensorArrayGatherV3:0", shape=(?, ?, 6), dtype=float32) is not an element of this graph.
当我使用一下代码进行测试的时候出现这个错误, hat_cfg = PPYOLO_2x_Config() hat_detector = PPYOLO_2x_Hat(hat_cfg, use_gpu=True) video_path = cfg.video_path
def main(): # ----------------------------------------视频处理------------------------------------------ cap = cv2.VideoCapture(video_path) print('load ' + video_path) print('---------------------------') index = 0 while True: print(index) ret, frame = cap.read() if not ret: break if index % cfg.sample_interval != 0: index += 1 continue _, hat_output_box = hat_detector.detect_image(frame) # 安全帽检测 print(hat_output_box) index+=1
if name == 'main': for i in range(3): threading.Thread(target=main).start()
The text was updated successfully, but these errors were encountered:
不建议多线程里使用模型
Sorry, something went wrong.
No branches or pull requests
ValueError: Tensor Tensor("lambda_1/map/TensorArrayStack/TensorArrayGatherV3:0", shape=(?, ?, 6), dtype=float32) is not an element of this graph.
当我使用一下代码进行测试的时候出现这个错误,
hat_cfg = PPYOLO_2x_Config()
hat_detector = PPYOLO_2x_Hat(hat_cfg, use_gpu=True)
video_path = cfg.video_path
def main():
# ----------------------------------------视频处理------------------------------------------
cap = cv2.VideoCapture(video_path)
print('load ' + video_path)
print('---------------------------')
index = 0
while True:
print(index)
ret, frame = cap.read()
if not ret:
break
if index % cfg.sample_interval != 0:
index += 1
continue
_, hat_output_box = hat_detector.detect_image(frame) # 安全帽检测
print(hat_output_box)
index+=1
if name == 'main':
for i in range(3):
threading.Thread(target=main).start()
The text was updated successfully, but these errors were encountered: