Open gxwawgw opened 1 month ago
vis_frame_stride = 30
plt.close("all")
for out_frame_idx in range(0, len(frame_names), vis_frame_stride):
plt.figure(figsize=(6, 4))
plt.title(f"frame {out_frame_idx}")
plt.imshow(Image.open(os.path.join(video_dir, frame_names[out_frame_idx])))
for out_obj_id, out_mask in video_segments[out_frame_idx].items():
show_mask(out_mask, plt.gca(), obj_id=out_obj_id)
I'm assuming you are using this code, If its true Adjust the Range() function in for loop
ann_frame_idx = 24 # the frame index we interact with
When my ann_frame_idx is not 0, running the model throws an error: "for out_obj_id, out_mask in video_segments[out_frame_idx].items(): KeyError: 0". This indicates that when I execute predictor.propagate_in_video(inference_state), the model only propagates backward. How can I make the model propagate across all images?