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
有没有朋友遇到同样问题?我在运行video_demo.py时,只有第一帧预测正确后面都是nan。我怀疑是utils.load_weights(model, "./yolov3.weights")这一句的问题,于是把这一句放到了while true里,如代码所示,结果预测正确,但视频速度非常慢了,因为每次都要加载一次权重,我不知道该怎么修改def load_weights(model, weights_file)。求助!
model = tf.keras.Model(input_layer, bbox_tensors) utils.load_weights(model, "./yolov3.weights") #model.summary() vid = cv2.VideoCapture(video_path) while True: #utils.load_weights(model, "./yolov3.weights") return_value, frame = vid.read() if return_value: frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) else: raise ValueError("No image!")
model = tf.keras.Model(input_layer, bbox_tensors)
utils.load_weights(model, "./yolov3.weights")
#model.summary()
vid = cv2.VideoCapture(video_path)
while True:
#utils.load_weights(model, "./yolov3.weights")
return_value, frame = vid.read()
if return_value:
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
else:
raise ValueError("No image!")
The text was updated successfully, but these errors were encountered:
遇到同样的问题
Sorry, something went wrong.
No branches or pull requests
有没有朋友遇到同样问题?我在运行video_demo.py时,只有第一帧预测正确后面都是nan。我怀疑是utils.load_weights(model, "./yolov3.weights")这一句的问题,于是把这一句放到了while true里,如代码所示,结果预测正确,但视频速度非常慢了,因为每次都要加载一次权重,我不知道该怎么修改def load_weights(model, weights_file)。求助!
model = tf.keras.Model(input_layer, bbox_tensors)
utils.load_weights(model, "./yolov3.weights")
#model.summary()
vid = cv2.VideoCapture(video_path)
while True:
#utils.load_weights(model, "./yolov3.weights")
return_value, frame = vid.read()
if return_value:
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
else:
raise ValueError("No image!")
The text was updated successfully, but these errors were encountered: