Commit Graph

70 Commits

Author SHA1 Message Date
henryruhs
857bede91e Disable onnxruntime warnings 2023-10-30 22:17:45 +01:00
Henry Ruhs
b85d474351
Refine face selection and detection (#174)
* Refine face selection and detection

* Update README.md

* Fix some face analyser UI

* Fix some face analyser UI

* Introduce range handling for CLI arguments

* Introduce range handling for CLI arguments

* Fix some spacings
2023-10-30 21:35:33 +01:00
henryruhs
1c0ac89b54 Fix refresh of swapper model 2023-10-28 10:34:43 +02:00
Henry Ruhs
22c0de3fe6
Simswap model (#171)
* Add simswap models

* Add ghost models

* Introduce normed template

* Conditional prepare and normalize for ghost

* Conditional prepare and normalize for ghost

* Get simswap working

* Get simswap working
2023-10-26 16:59:56 +02:00
henryruhs
2209109c8f Set the reference_frame_number in face_selector component 2023-10-24 11:41:36 +02:00
henryruhs
3d50b95dc7 Accurate event handling 2023-10-24 11:07:14 +02:00
henryruhs
645ef11f7b Accurate event handling 2023-10-24 10:15:04 +02:00
henryruhs
8cf6394672 Accurate event handling 2023-10-24 09:59:20 +02:00
henryruhs
5dbc65beed Temp fix for shaking face 2023-10-22 22:12:09 +02:00
henryruhs
6e582ac910 Cosmetics on face analyser ARGS and globals 2023-10-22 13:39:56 +02:00
Henry Ruhs
228febd73b
Replace retinaface with yunet (#168)
* Remove insightface dependency

* Fix urllib

* Some fixes

* Analyse based on matches

* Analyse based on rate

* Fix CI

* Migrate to Yunet

* Something is off here

* We indeed need semaphore for yunet

* Normalize the normed_embedding

* Fix download of models

* Fix download of models

* Fix download of models

* Add score and improve affine_matrix

* Temp fix for bbox out of frame

* Temp fix for bbox out of frame

* ROCM and OpenVINO mapping for torch backends

* Normalize bbox

* Implement gender age

* Cosmetics on cli args

* Prevent face jumping

* Fix the paste back speed

* FIx import

* Introduce detection size
2023-10-22 12:33:31 +02:00
henryruhs
738d69a10b Fix import 2023-10-21 23:17:32 +02:00
henryruhs
63bab0f84c Fix the paste back speed 2023-10-21 23:03:45 +02:00
henryruhs
d81371faea ROCM and OpenVINO mapping for torch backends 2023-10-19 08:16:23 +02:00
henryruhs
782299073c Fix CI 2023-10-17 18:01:10 +02:00
henryruhs
f1655947e1 Analyse based on rate 2023-10-17 17:45:22 +02:00
henryruhs
0d7162ddf8 Analyse based on matches 2023-10-17 17:25:39 +02:00
henryruhs
220209bd3d Fix urllib 2023-10-17 00:54:53 +02:00
henryruhs
1c3ccea849 Pass kps direct to warp_face 2023-10-16 22:51:24 +02:00
henryruhs
bc7910e79f Uniform frame handling for predictor 2023-10-16 15:46:29 +02:00
henryruhs
401aa780b0 Uniform model handling for predictor 2023-10-16 11:24:00 +02:00
henryruhs
8cf09f62bb Fix different color on box 2023-10-16 00:31:43 +02:00
henryruhs
a4acc8c423 Move template and size to the options 2023-10-15 23:11:55 +02:00
henryruhs
dc78e3b2ac Make CI happy 2023-10-14 23:41:48 +02:00
henryruhs
27e506f5ac Move the predictor to ONNX to avoid tensorflow, Use video ranges for prediction 2023-10-14 23:26:44 +02:00
henryruhs
c83219eb7c Cosmetic changes 2023-10-14 21:07:45 +02:00
henryruhs
d80d496b93 Improve paste back performance 2023-10-14 19:46:15 +02:00
henryruhs
d5bb7009b6 Remove semaphore where possible 2023-10-14 18:36:33 +02:00
henryruhs
3a9a0f017b Swap and paste back without insightface 2023-10-14 18:20:41 +02:00
henryruhs
ebfd3a7b30 Swap and paste back without insightface 2023-10-14 17:51:23 +02:00
henryruhs
5dcf36ea64 Move code to face helper 2023-10-14 16:16:13 +02:00
henryruhs
f34a3574ac Simplify bbox access 2023-10-13 09:59:22 +02:00
henryruhs
8afc7914a8 Code cleanup 2023-10-13 09:57:35 +02:00
henryruhs
a6bab3285c Simplify bbox access 2023-10-11 13:53:00 +02:00
Henry Ruhs
ea8ecf7db0
Next 1.3.1 (#149)
* Use default flags for installer

* Remove condition for cpu

* Okay, here we have default torch

* Update preview

* Fix CI
2023-10-10 13:18:03 +02:00
henryruhs
5591b03a88 Hotfix installer 2023-10-09 13:43:03 +02:00
Henry Ruhs
a6809c3ccb
Next (#144)
* Improve typing for our callbacks

* Return 0 for get_download_size

* Introduce ONNX powered face enhancer

* Introduce ONNX powered face enhancer

* Introduce ONNX powered face enhancer

* Remove tile processing from frame enhancer

* Fix video compress translation for libvpx-vp9

* Allow zero values for video compression

* Develop (#134)

* Introduce model options to the frame processors

* Finish UI to select frame processors models

* Simplify frame processors options

* Fix lint in CI

* Rename all kind of settings to options

* Add blend to enhancers

* Simplify webcam mode naming

* Bypass SSL issues under Windows

* Fix blend of frame enhancer

* Massive CLI refactoring, Register and apply ARGS via the frame processors

* Refine UI theme and introduce donate button

* Update dependencies and fix cpu only torch

* Update dependencies and fix cpu only torch

* Fix theme, Fix frame_processors in headless mode

* Remove useless astype

* Disable CoreML for the ONNX face enhancer

* Disable CoreML for the ONNX face enhancer

* Predict webcam too

* Improve resize of preview

* Change output quality defaults, Move options to the right

* Support for codeformer model

* Update the typo

* Add GPEN and GFPGAN 1.2

* Extract blend_frame methods

* Extend the installer

* Revert broken Gradio

* Rework on ui components

* Move output path selector to the output options

* Remove tons of pointless component updates

* Reset more base theme styling

* Use latest Gradio

* Fix the sliders

* More styles

* Update torch to 2.1.0

* Add RealESRNet_x4plus

* Fix that button

* Use latest onnxruntime-silicon

* Looks stable to me

* Lowercase model keys, Update preview and readme
2023-10-09 10:16:13 +02:00
henryruhs
3e361e7701 Hotfix skip download 2023-09-26 21:48:44 +02:00
henryruhs
81797e2423 Update pillow as of security issue 2023-09-22 21:54:55 +02:00
Henry Ruhs
95bac6668c
Next (#122)
* Clear VRAM of face analyser on post process

* Mark as NEXT

* Reduce tensorflow memory to 512 MB

* Cosmetics on installer

* Add is_download_done to pre_process() hook to prevent errors

* Use latest onnxruntime

* Testing for download methods, Make get_download_size more robust

* Testing for download methods

* Introduce --skip-download argument

* Catch exception causes by a firewall

* Looks stable to me
2023-09-22 10:28:38 +02:00
Henry Ruhs
66ea4928f8
Next (#107)
* Allow passing the onnxruntime to install.py

* Fix CI

* Disallow none execution providers in the UI

* Use CV2 to detect fps

* Respect trim on videos with audio

* Respect trim on videos with audio (finally)

* Implement caching to speed up preview and webcam

* Define webcam UI and webcam performance

* Remove layout from components

* Add primary buttons

* Extract benchmark and webcam settings

* Introduce compact UI settings

* Caching for IO and **** prediction

* Caching for IO and **** prediction

* Introduce face analyser caching

* Fix some typing

* Improve setup for benchmark

* Clear image cache via post process

* Fix settings in UI, Simplify restore_audio() using shortest

* Select resolution and fps via webcam ui

* Introduce read_static_image() to stop caching temp images

* Use DirectShow under Windows

* Multi-threading for webcam

* Fix typing

* Refactor frame processor

* Refactor webcam processing

* Avoid warnings due capture.isOpened()

* Resume downloads (#110)

* Introduce resumable downloads

* Fix CURL commands

* Break execution_settings into pieces

* Cosmetic changes on cv2 webcam

* Update Gradio

* Move face cache to own file

* Uniform namings for threading

* Fix sorting of get_temp_frame_paths(), extend get_temp_frames_pattern()

* Minor changes from the review

* Looks stable to tme

* Update the disclaimer

* Update the disclaimer

* Update the disclaimer
2023-09-19 11:21:18 +02:00
Henry Ruhs
7f69889c95
Hotfix torch installation (#83)
* Hotfix torch installation

* Hotfix torch installation
2023-09-07 01:26:33 +02:00
henryruhs
bf3be6f73c Hotfix UDP stream on Windows 2023-09-06 15:19:19 +02:00
Henry Ruhs
82eaf76da8
Develop (#73)
* Cosmetic changes

* Cosmetic changes

* Run single warm up for the benchmark suite

* Use latest version of Gradio

* More testing

* Introduce basic installer

* Fix typo

* Move more to installer file

* Fix the installer with the uninstall all trick

* Adjust wording

* Fix coreml in installer

* Allow Pyhton 3.9

* Add VENV to installer

* Just some cosmetics

* Just some cosmetics

* Dedicated headless mode, Refine API of UI layouts

* Use --headless for pytest

* Fix testing for Windows

* Normalize output path that lacks extension

* Fix CI for Windows

* Fix CI for Windows

* UI to change output path

* Add conda support for the installer

* Improve installer quite a bit

* Drop conda support

* Install community wheels for coreml silicon

* Improve output video component

* Fix silicon wheel downloading

* Remove venv from installer as we cannot activate via subprocess

* Use join to create wheel name

* Refine the output path normalization

* Refine the output path normalization

* Introduce ProcessMode and rename some methods

* Introduce ProcessMode and rename some methods

* Basic webcam integration and open_ffmpeg()

* Basic webcam integration part2

* Benchmark resolutions now selectable

* Rename benchmark resolution back to benchmark runs

* Fix repeating output path in UI

* Keep output_path untouched if not resolvable

* Add more cases to normalize output path

* None for those tests that don't take source path into account

* Finish basic webcam integration, UI layout now with custom run()

* Fix CI and hide link in webcam UI

* Cosmetics on webcam UI

* Move get_device to utilities

* Fix CI

* Introduce output-image-quality, Show and hide UI according to target media type

* Benchmark with partial result updates

* fix: trim frame sliders not appearing after draggin video

* fix: output and temp frame setting inputs not appearing

* Fix: set increased update delay to 250ms to let Gradio update conditional inputs properly

* Reverted .gitignore

* Adjust timings

* Remove timeout hacks and get fully event driven

* Update dependencies

* Update dependencies

* Revert NSFW library, Conditional unset trim args

* Face selector works better on preview slider release

* Add limit resources to UI

* Introduce vision.py for all CV2 operations, Rename some methods

* Add restoring audio failed

* Decouple updates for preview image and preview frame slider, Move reduce_preview_frame to vision

* Refactor detect_fps based on JSON output

* Only webcam when open

* More conditions to vision.py

* Add udp and v4l2 streaming to webcam UI

* Detect v4l2 device to be used

* Refactor code a bit

* Use static max memory for UI

* Fix CI

* Looks stable to me

* Update preview

* Update preview

---------

Co-authored-by: Sumit <vizsumit@gmail.com>
2023-09-06 00:25:18 +02:00
henryruhs
4ffae94bac Looks stable to me 2023-08-22 17:34:40 +02:00
henryruhs
20138d0957 Stop showing potential audio issue message 2023-08-22 10:54:21 +02:00
henryruhs
0c34dd846c Simplify code and reduce to 25fps by default 2023-08-22 10:44:55 +02:00
henryruhs
09c2fb2f46 Respect the trim frame args on UI launch 2023-08-22 10:09:27 +02:00
Henry Ruhs
d8d607cb23
Merge pull request #11 from facefusion/develop
Develop
2023-08-22 01:55:56 +02:00
henryruhs
b48240d3ec Fix restore audio 2023-08-22 01:47:56 +02:00