mediapipe: mediapipe.autoFlip error - Segmentation Fault : 11 when running the autoflip example multiple times.
I’ve followed the installation steps for autoflip and build it using the following command:
bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 mediapipe/examples/desktop/autoflip:run_autoflip
I ran the autoflip example by specifying the input & output file locations using command:
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=1:1
and I get the following error:

This issue appears more often when the you try to run the example multiple times. For this, I created a bash script which runs the example 5 times (which is why you see the error in above image referring to the bash script line where it failed).
Here is the link to the video file I used when running the example : https://github.com/keplerlab/katna/blob/master/tests/data/pos_video.mp4
Below are the system details: OS : MacOS Catalina (v 10.15.7), Memory : 16 GB, openCV & bazel version - OpenCV @ 3, bazel 4.0.0-homebrew
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 19
Thank you @jiuqiant for finding the location of the crash. In the short term, another workaround is to not use the BorderDetectionCalculator since it is an optional input to SceneCroppingSalculator. Removing it from the graph may stop the crash, however if the video has black bars on the top/bottom they will not be removed by autoflip as this is handled by the border_detection_calculator.cc.
Some older video content has black bars burned directly into the video but it is not typical to do this with modern videos. You may consider whether you need the BorderDetectionCalculator for your specific use case.