mediapipe/mediapipe/examples/desktop/autoflip
MediaPipe Team 7c2d654d67 Convert CHECK macro to ABSL_CHECK.
Chrome can't use Absl's CHECK because of collisions with its own version.

PiperOrigin-RevId: 561740965
2023-08-31 13:20:29 -07:00
..
calculators Use ABSL_LOG in MediaPipe. 2023-08-30 13:43:49 -07:00
quality Convert CHECK macro to ABSL_CHECK. 2023-08-31 13:20:29 -07:00
subgraph Project import generated by Copybara. 2021-06-24 17:55:26 -04:00
autoflip_graph_development.pbtxt Project import generated by Copybara. 2020-01-10 15:51:18 -08:00
autoflip_graph.pbtxt Project import generated by Copybara. 2020-01-10 15:51:18 -08:00
autoflip_messages.proto Internal change 2023-01-11 14:24:00 -08:00
BUILD Internal change 2023-04-03 09:45:42 -07:00
README.md Project import generated by Copybara. 2020-03-10 18:14:25 -07:00

Steps to run the AutoFlip video cropping graph

  1. Checkout the repository and follow the installation instructions to set up MediaPipe.

    git clone https://github.com/google/mediapipe.git
    cd mediapipe
    
  2. Build and run the run_autoflip binary to process a local video.

Note: AutoFlip currently only works with OpenCV 3 . Please verify your OpenCV version beforehand.

```bash
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 \
  --input_side_packets=input_video_path=/absolute/path/to/the/local/video/file,output_video_path=/absolute/path/to/save/the/output/video/file,aspect_ratio=width:height
```
  1. View the cropped video.