google-ai-edge / mediapipe

Cross-platform, customizable ML solutions for live and streaming media.
https://ai.google.dev/edge/mediapipe
Apache License 2.0
27.42k stars 5.15k forks source link

Question on box tracking #1880

Closed youngkyungkim closed 3 years ago

youngkyungkim commented 3 years ago

I have successfully built a box tracking part inside the docker container, using the code that was given, which is

bazel build -c opt \ --define MEDIAPIPE_DISABLE_GPU=1 \ --define no_aws_support=true \ --linkopt=-s \ mediapipe/examples/desktop/object_tracking:object_tracking_cpu

However, I was struggling to run the analysis, when my input is a video file not from a camera. For running a code below, I get error message saying "ERROR: Unknown command line flag 'input_side_packets'":

GLOG_logtostderr=1 bazel-bin/mediapipe/examples/desktop/object_tracking/object_tracking_cpu \ --calculator_graph_config_file=mediapipe/graphs/tracking/object_detection_tracking_desktop_live.pbtxt \ --input_side_packets=input_video_path=input/input.avi ,output_video_path=output/output.avi

I wasn't able to find any tutorial or document for this so I was stuck... Any tips or resources of using box tracking inside the docker would be appreciated, especially on what kind of parameters there are for me to extract some data into json or csv files!

Lastly, I had a question on whether all this media pipe analysis is computed in local computer. It seems like it does from looking at documentation but I just wanted to double check since I am using clinical videos, which prevents me to move the video into other server except local machine.

Thank you!

sgowroji commented 3 years ago

Hi @youngkyungkim, Could you please share your code, so that we can guide well. Thanks!

youngkyungkim commented 3 years ago

@sgowroji Hi! Thank you for helping me out!

  1. I used below code to create a container: docker run -it --name mediapipe \ -v /diskA/data/food_adventure/raw/temp/input:/mediapipe/input \ -v /diskA/data/food_adventure/raw/temp/output:/mediapipe/output \ mediapipe:latest
  2. I used the below code to build for analysis: bazel build -c opt \ --define MEDIAPIPE_DISABLE_GPU=1 \ --define no_aws_support=true \ --linkopt=-s \ mediapipe/examples/desktop/object_tracking:object_tracking_cpu
  3. I used the below code to conduct analysis but it would give me error "ERROR: Unknown command line flag 'input_side_packets'": GLOG_logtostderr=1 bazel-bin/mediapipe/examples/desktop/object_tracking/object_tracking_cpu \ --calculator_graph_config_file=mediapipe/graphs/tracking/object_detection_tracking_desktop_live.pbtxt \ --input_side_packets=input_video_path=input/input.avi ,output_video_path=output/output.avi

It seems like the "input_side_packets" is not the right parameter when we use for box tracking. I was wondering where I could find place for all the parameters I could use for box tracking.

Also, I just wanted to ask you whether all this media pipe analysis is computed in local computer. It seems like it does from looking at documentation but I just wanted to double check since I am using clinical videos, which prevents me to move the video into other server except local machine.

Thank you in advance!

jiuqiant commented 3 years ago

I believe you need to do

GLOG_logtostderr=1 bazel-bin/mediapipe/examples/desktop/object_tracking/object_tracking_cpu \
  --calculator_graph_config_file=mediapipe/graphs/tracking/object_detection_tracking_desktop_live.pbtxt \
  --input_video_path==input/input.avi \
  --output_video_path=output/output.avi
google-ml-butler[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.

google-ml-butler[bot] commented 3 years ago

Closing as stale. Please reopen if you'd like to work on this further.

google-ml-butler[bot] commented 3 years ago

Are you satisfied with the resolution of your issue? Yes No