增加对训练和推理中图片情况的判断
This commit is contained in:
@ -117,6 +117,9 @@ def run_detect_yolo(detect_log_in: ProjectDetectLogIn, session: Session = Depend
|
||||
train = get_train(detect_log_in.train_id, session)
|
||||
if train is None:
|
||||
return rc.response_error("训练权重不存在")
|
||||
detect_img_count = pdc.check_detect_img(detect_log_in.detect_id, session)
|
||||
if detect_img_count == 0:
|
||||
return rc.response_error("推理集合中没有图片,请先到推理集合中上传图片")
|
||||
detect_log = pds.run_detect_yolo(detect_log_in, detect, train, session)
|
||||
thread_train = threading.Thread(target=run_event_loop, args=(detect_log.pt_url,
|
||||
detect_log.folder_url,
|
||||
|
Reference in New Issue
Block a user