fisadev / virtualbackground

Fake webcam that replaces your background with a custom image
MIT License
76 stars 8 forks source link

Everything works just fine, but the processor is allways at 100% no matter what configuration I am using #9

Open Daniel721 opened 3 years ago

Daniel721 commented 3 years ago

The issue is just like in the title. I've got an intel i5 processor with chipset graphics on my laptop. I'm not using a dedicated graphic card like Nvidia and no matter which tensorflow module I'm using (tensorflow, tensorflow-gpu, or tensorflow-cpu) my processor is stil at 100% all the time. (I am using linux mint - ubuntu) I even changed the "--model-name " to "mobilenet_quant4_075_stride16" and the result is the same for my processor...
I like your software more than other "virtual background", becouse it's got many options like changing the "segmentation treshold"... Is there a tensorflow module which consume less cpu? I've seen, there are only 2 in your software ("mobilenet_quant4_075_stride16" and "mobilenet_quant4_100_stride16") Thank you, anyway, for this great software!

Daniel721 commented 3 years ago

I've found a solution about how to change the model, using a bsh script Inside "models" folder

#!/bin/sh
mkdir mobilenet_quant4_050_stride8
wget -O bodypix_mobilenet_float_050_model-stride8/model.json https://storage.googleapis.com/tfjs-models/savedmodel/bodypix/mobilenet/float/050/model-stride8.json
wget -O bodypix_mobilenet_float_050_model-stride8/group1-shard1of1.bin https://storage.googleapis.com/tfjs-models/savedmodel/bodypix/mobilenet/float/050/group1-shard1of1.bin

That was the ony model that was working for me with "virtualbackground". Of course I added a new line to the "viba.py". Bellow 'mobilenet_quant4_075_stride16': 'bodypix/mobilenet/float/075/model-stride16.json',` I added 'mobilenet_quant4_050_stride8': 'bodypix/mobilenet/float/050/model-stride8.json',` That did the trick... :) But my processor is still to 100% percent...