Not an issue: changing det-dize / processing speed #65
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I've been playing around with the line
app.prepare(ctx_id= 0, det_thresh=opt.det_thresh, det_size=(640, 640))
in test_video_swapsingle.py
Setting lower values (480, 320, 256, 160) significant increases the processing speed
Setting to 256 doubles #it/sec.
It nearly always gives the same results, depending on video resolution and size of the face in the video frame.
eg. if your video is 720p height and the face is someting like 256pixel height in it you can use det-size 256 and it is working.
But arcface throws a lot of warnings for every frame:
[W:onnxruntime:, execution_frame.cc:721 onnxruntime::ExecutionFrame::VerifyOutputSizes] Expected shape from model of {12800,10} does not match actual shape of {3200,10} for output 454
Can this be done a better way?
Maybe you can try 320*320. And I thought you can go to insightface to ask the author, cause I just use it as a tool to detect face Hhhh.
Yes. You have to use all other values as a pair (640,640 or 320,320 or.....)
Searched the net so far but couldn't find more information so I asked
You can create a issue right here insightface, they should be professional enough to solve your problem.
You can call
onnxruntime.set_default_logger_severity(3)to avoid warning.Thank you. That works.
Excuse me but, in which file do you find that value? I'm modifying "face_detect_crop_single.py" but it doesn't change the resolution or the det size. Thanks!
As described above.
Change value in test_video_swapsingle.py
So I tried changing from 640 to 320, but still only seeing 1 it/s. My graphics card is a Titan V.
I've only managed to find an import of set_default_logger_severity function in onnxruntime/init.py, but so far I was unable to pinpoint where are the calls to onnxruntime.
Turned out, putting set_default_logger_severity(3) into onnxruntime/init.py works totally fine: warnings're gone.