SwatiModi / virtual-background-app

A Zoom-like real-time virtual background app, made with Portrait segmentation and Google's MediaPipe
Apache License 2.0
42 stars 21 forks source link

Tracing and profiling in mediapipe #4

Open XinJiang1994 opened 3 years ago

XinJiang1994 commented 3 years ago

I have sovle the problem of low resolution, but I met a new problem. There is a 10s delay of the vedio. I want to trace the computing time of each node to find the causes. So I follow the instructions of this link https://google.github.io/mediapipe/tools/tracing_and_profiling.html#enabling-tracing-and-profiling. But it doesn't work. I guess I put the following configure in the wrong place: profiler_config { trace_enabled: true enable_profiler: true trace_log_interval_count: 200 trace_log_path: "/sdcard/Download/" } I first put it in the the CalculatorGraphConfig (in /mediapipe/framework/calculator.proto) . Then it failed to compile. Then I put it in the graph file(portrait_segmentation.pbtxt) and this time the compiling is ok. But I still didn't get the tracing files. Do you have any idea about this problem?

jls502 commented 3 years ago

hi, how did y sovle the problem of low resolution ?

XinJiang1994 commented 3 years ago

hi, how did y sovle the problem of low resolution ?

I simply resize the mask to original size of the image. Then use the original image and the resized mask to do the background replace. So the image preserved its resolution.