-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
example --ffmpeg-config? #18
Comments
I have tested it on my machine and it works as intended with the example configuration, given a video file example.mp4: |
There is an interesting bug: when you try to deface with quality 10 the movie output is shorter and unreadble for quicktime, but with 9 it works nicely. It might be related to imageio I guess. |
this is what i receive :/ Do you have any recommendation? sometimes I get the imageio error but its not az image it is an mp4 file also
am I doing something wrong? I did work with a video same codec same filetype same camera before and now it stops with this one |
@divajsz can you share the exact command that you used with the I don't know what is happening in your second issue. Can you open the video with
|
You had your point, I had no FFMPEG installed. Since this PC is part of AD I have no admin rights at night but I could get over it with the "Set-ExecutionPolicy Bypass -Scope CurrentUser -Force" to get deface to be installed and to run but still if I have FFMPEG installed I have the same error "(venv) PS D:\video> deface .\GH010144.MP4 how can I convince it to use imageio-ffmpeg rather then imageio? since it is a video not a photo |
I copied your line from above deface --ffmpeg-config='{"codec": "libx265"}' example.mp4 gives the error :
but as I said, I copied the line not to mess up with brackets "" Btw I'm on win10 with python 3.12.2 also I tried to install onnx onnxruntime-gpuget modules but they do not get installed :/ |
I have notices this issue: And I tried to upgrade imageio but it is already the latest:
still it gives this error for the following command: output:
|
@mdraw do you have any suggestion? |
Reinstalled with python 3.7 and deface is working fine (onnx is not installing but it is a different issue) |
Hi All! I managed to set up deface in Win10 enviroment with Python 3.7 installed from the Store app. I had some ups and downs so I wanted to share a kind of manual how I got to a working deface with compiled onnx module. I have not got to CUDA yet but I'll try in the future. So first get Python 3.7 from the store. You click it, it gets installed, so far so good. 3.12 is available but I got trouble with it (imageio gets error and deface doesn't start ) and I ended up as an other poster in the issues section so just go on with 3.7 for now. start powershell from start menu by typeing and hit enter create a virtual enviroment: Since my laptop is part of a company domain I had to allow running scripts on the machine which can be made with the following you need to use it otherwise you wont be able to activate the enviroment with this: install deface install cmake (only if you want onnx later. for comparison what takes 4-5 hours to deface with onnx it can be reduced to 70 minutes) install dlib too to be able to build wheel you need visual studio community edition2022 (mine is 17.9.4) with python developement and desktop developement C++. Download and install Then you need to setup your path otherwise wheel build will fail with error "FileTracker : error FTK1011: could not create the new file tracking log file" You have a string, add up this at the end: Then add these two, I've found them as a solution for the error above: The compiler hits the possible length of a path so you need to modify this key in the registry not to have this "file not found" error during compilation
Then install onnx related stuff onnx is not available as binary so python will start to compile it with cmake. It takes a lot of time but at the end onnx will be installed (currently 1.15.0) Since I could not set up cuda yet I tried I installed the directml module and it works fine. Which takes the original Execution provider CPU for 4-5 hours the directml does it for 1hours 15 minutes. let me show you my package lists to check if you have the same (in an activated venv type
I hope you can make it work too, if I get on with cuda I'll let you know |
So the issue is Windows and how the command line works. You need to input it like this deface --ffmpeg-config "{"codec": "libx265"}" example.mp4 You can check my RC branch fork that has a GUI and face recognition that gives examples for the json config in the help file. In the GUI it's not required. |
You only want one installed. Each next install overwrites the folder they share in site-packages onnxruntime 1.17.1 Choose one To get cuda you need Cuda toolkit If tensor you need the tensor rt package to add to cuddn |
I've tried this and my input to deface is exactly as follows: deface --ffmpeg-config "{"codec": "libx265"}" test.mp4 I get the same error as previous users: deface: error: argument --ffmpeg-config: invalid loads value: '{codec: libx265}' I've also tried to use the fps config arguments {"fps": 10} and get the same error saying invalid loads value. Update: I think the issue is with parsing the config commands, I put in a backslash \ before and after fps, so my command line was: The program ran correctly with reduced frames as specified. Although now there is a slightly new error with how the progress bar updates in the console output. Since the config is overriding the frames analyzed, the command bar does not fill all the way up to 100% even though all of the video may be processed. This is what the progress bar looks like when I have a 30fps video downsampled to 10fps. As you'd expect, only 1/3 of the video is actually 'processed' in the bar from the original video and that may be what it is showing. |
So i was able to replicate what you have here. It does seem something has changed for the config args but the fps and bar updating is not really an error. It due to the fact that the code does not calculate the total frame when specified another fps. You can adjust the python code but adding This has been tested on my forked version which fixes the frame counting failure on Darwin so deface will also need UPDATE: I have forgot that the deface uses print but I have swapped to tqdm.write so it might also need This is the tested product with a 30fps video scaled to 10fps and the counter working fine.
|
Idea for adjusting the bar to be the new fps if specified so the bar progress completes. ORB-HD#18 (comment)
I have added it. Have not tested a new pull/install yet, just the current install. |
Would you mind giving an example of the arguments for this option? even the default option doesn't seem to work.
The text was updated successfully, but these errors were encountered: