This open-source framework, ‘AutoFlip’, can do automated video cropping using AI

Many times when we see a video on mobile devices is badly cropped, it is not much you can do about it. Understanding this problem, Google’s AI’s team has built an open-source solution on top of MediaPipeAutoflip, which can reframe a video that fits any device or dimension (landscape, portrait, etc.). 

AutoFlip works in three phases. The first phase includes scene detection; the second is the video content analysis, and the third is reframing. For this tool, if a video and a target dimension are given, it analyzes the video content. Later it develops optimal tracking and cropping strategies, which finally enables it to create an output video at the same time limit in the desired aspect ratio.

Unlike traditional approaches for reframing, AutoFlip does not require video curators instead its totally automatic using artificial intelligence.

Run the following command to build the AutoFlip pipeline:

bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 mediapipe/examples/desktop/autoflip:run_autoflip


GLOG_logtostderr=1 bazel-bin/mediapipe/examples/desktop/autoflip/run_autoflip \
  --calculator_graph_config_file=mediapipe/examples/desktop/autoflip/autoflip_graph.pbtxt \

MediaPipe Graph

Image Source:

Codes (Github):