1
0
Fork 0
mirror of https://github.com/deepfakes/faceswap synced 2025-06-09 04:36:50 -04:00
Commit graph

102 commits

Author SHA1 Message Date
torzdf
ff8d85118e
Cli Restructure + Multi-Mask Select on Extract (#1012)
- Split up cli.py to smaller modules
- Enable Multi Mask Selection in Extraction
- Handle multi option selection options in the GUI
- Document lib/cli
2020-04-22 00:04:21 +01:00
torzdf
ab4ef75671 Extract - Allow multiple pipelines to be loaded 2020-04-02 15:53:29 +01:00
torzdf
8d4f381e7c Extract - Better VRAM Allocation in Extraction Pipeline 2020-03-31 15:24:32 +01:00
torzdf
bb3e3d0f16 Extraction - Auto generate Components and Extended Masks 2020-03-30 19:24:29 +01:00
torzdf
e7c5b7b633 Bugfix: cv2-dnn aligner - Assertion image is empty error 2020-03-29 18:24:58 +01:00
torzdf
924d53789b
Core updates (#982)
* plugins.extract.align
  - Expose normalization method

* lib.gui core updates
  - Minor updates to support future development.
2020-03-10 14:48:12 +00:00
torzdf
e58fd535d5 bugfix: CV2-DNN aligner. Fix Assertion error when bounding box falls out of frame 2020-03-06 12:10:40 +00:00
torzdf
76bf610996 plugins.extract.mask - Enable allow_growth option for mask tool 2020-01-26 00:34:59 +00:00
torzdf
aede5f0f44 bugfix: Extract - Calculate zero sized faces prior to scaling up 2019-11-30 19:33:59 +00:00
torzdf
4fdeb67fba Bugfix - Manual tool. Use new ExtractMedia class 2019-11-29 23:53:00 +00:00
torzdf
46309771bb plugins.extract - Create ExtractMedia class for pipeline flow
Bugfix - Fix memory leak in extract
2019-11-29 00:46:27 +00:00
Kyle
d5c2063459 fix to error on out of bounds 2019-11-15 18:09:12 -06:00
torzdf
e4b7717c64 Minor fixes 2019-11-15 20:16:45 +00:00
kvrooman
47681a8bab Landmarks stored and used as floating point numbers (#928)
* remove and fix int adjustments
* masking rounding
2019-11-15 11:01:37 +00:00
kvrooman
36be6cd4d8 Vectorize FAN post-processing (#926) 2019-11-14 13:01:35 +00:00
kvrooman
64a400f6b4 Refine S3FD post-processing: NMS box voting (#902) 2019-11-14 12:49:47 +00:00
torzdf
73ff840fbd scripts.extract - code optimizations
Limit queue sizes to reduce RAM usage
Rename lib.image.BackgroundIO to ImageIO
Create separate ImagesLoader and ImagesSaver classes
Load/Save images from centralized lib.image.ImageIO
scripts.extract documentation
2019-11-13 19:16:25 +00:00
kvrooman
b49c352e8f # pylint:disable=no-member cleanup (#927)
# pylint:disable=no-member cleanup
2019-11-13 12:17:59 +00:00
kilroythethird
54b6e86008 Changed MTCNN input to RGB 2019-11-11 20:13:33 +01:00
torzdf
68109fcc80 bugfix: plugins.extract.pipeline - Exclude CPU plugins from vram calculations 2019-10-29 22:41:01 +00:00
torzdf
ef49d121e1 Add masker to Travis Tests
Bugfix: Parallel VRAM calculation for non-gpu extractors
2019-10-28 11:56:38 +00:00
Vyacheslav Linnik
9af7726897 Always set batchsize as int (#913) 2019-10-26 22:51:04 +01:00
torzdf
e488baf5f4 Mask Updates
- Remove storage of original frame_dims from alignments file
- Require frame dims to be passed in to faces_detect.Mask when requesting full frame mask
- Create copy of read only mask when adding blurring/threshold
2019-10-25 17:25:06 +00:00
torzdf
c065916f23 Extract - Mask updates
- Remove none mask plugin
- Make pipeline more flexible
- Add support for pre-aligned faces to masker plugin
- Migrate blur and threshold settings to mask output
2019-10-23 15:05:24 +00:00
torzdf
ad035f2a24 Optimize Extract parallel VRAM allocation 2019-10-19 23:53:42 +00:00
torzdf
d93e7b1114 Smart Mask - Extract code review
- Lint simple_tests.py
- Only reformat alignments file if it exists otherwise change filename
- Update legacy alignments to new format at all stages
- faces_detect.Mask.from_dict - logging format fix
- convert.py fix otf for new pipeline
- cli.py - Add note that masks not used. Revert convert masks
- faces_detect.py - Revert non-extract code
- Add .p and .pickle extensions for serializer
- plugins/extract revert some changes
- scripts/fsmedia - Revert code changes
- Pipeline - cleanup
- Consistant alpha channel stripping (fixes single-process)
- Store landmarks as numpy array
- Code attribution
- Normalize feed face and reference face to 0.0 - 1.0 in convert
- Lock in mask VRAM sized
- Add documentation to plugin_loader
- Update alignments tool to work with new format
2019-10-18 15:44:25 +00:00
torzdf
eceee07241 Legacy alignments update
- Remove legacy update hashes
- Remove legacy job from alignment-tools
- Remove legacy landmark rotation
- Add rotate face method to plugins/extract/detect
- Update travis test for new alignments extension
- Alignments format to .fsa
- Remove serializer option from alignments-tool
- Auto update legacy format alignment files to new format
2019-10-15 16:08:20 +00:00
torzdf
bc822fad22 Merge branch 'staging' into smart-mask-alpha 2019-10-15 09:40:26 +00:00
torzdf
bc6ab7313f Mask extraction fixes
- Save mask to alignments file as dict
- Remove blur_kernel param from plugins
- Correctly read out the mask buffer on decompress
- Fix full frame mask output
- Remove BORDER_TRANSPARENT in warp_affine (it is bugged. Don't use it)
- Store the affine matrix for the saved mask size
2019-10-14 18:42:59 +00:00
torzdf
d60118fd6f Capture cudnn launch error in extract model init 2019-10-14 09:37:58 +01:00
torzdf
70ee125283 Serialize masks to alignments file
- Add new serializers (npy + compressed)
- Remove Serializer option from cli
- Revert get_aligned call in scripts/extract
- Default alignments to compressed
- Size masks to 128px and compress
- Remove mask thresholding/blur from generation code
- Add Mask class to lib/faces_detect
- Revert debug landmarks to aligned face
- Revert non-extraction code to staging version
2019-10-13 22:50:28 +00:00
torzdf
468e2709de Mask plugin cleanup
- PEP8 Fixes
- Remove config for non NN Masks
- Tidy up defaults helptext
- cli.py fix typos
- Remove unused imports and functions _base.py
- Standardize input_size param
- Enable and update documentation
- Change references from `aligner` to `masker`
- Change  input_size, output_size and coverage_ratio from kwargs to params
- Move load_aligned to batch input iterator
- Remove unnecessary self.input param
- Add softmax layer append function to KSession
- Remove references to KSession protected objects
- Standardize plugin output into finalize method
- Make masks full frame and add to lib.faces_detect
- Add masks to alignments.json (temporary zipped base64 solution)
2019-10-11 18:17:39 +00:00
kvrooman
995a857154 Smart Mask Exposure for Extraction & Training (#831)
Smart Masks - Initial Commit
2019-10-07 16:16:18 +01:00
torzdf
861f78fff1 Capture cuDNN error in extract and raise a useful message 2019-09-29 17:18:50 +01:00
torzdf
29a75b90d4 Extract: Expose "allow_growth" option 2019-09-29 12:06:04 +01:00
torzdf
66ed005ef3
Optimize Data Augmentation (#881)
* Move image utils to lib.image
* Add .pylintrc file
* Remove some cv2 pylint ignores
* TrainingData: Load images from disk in batches
* TrainingData: get_landmarks to batch
* TrainingData: transform and flip to batches
* TrainingData: Optimize color augmentation
* TrainingData: Optimize target and random_warp
* TrainingData - Convert _get_closest_match for batching
* TrainingData: Warp To Landmarks optimized
* Save models to threadpoolexecutor
* Move stack_images, Rename ImageManipulation. ImageAugmentation Docstrings
* Masks: Set dtype and threshold for lib.masks based on input face
* Docstrings and Documentation
2019-09-24 12:16:05 +01:00
torzdf
1cdbc5ea27 Update cli for MTCNN 2019-09-18 23:37:22 +00:00
torzdf
a14bb9d636 extract: Autoset batchsize if it is too large in singleprocess mode 2019-09-18 23:00:55 +00:00
torzdf
feb5f75201 set mtcnn Nvidia defaults 2019-09-18 22:30:49 +00:00
kilroythethird
b7cd51a2f1 Optimized mtcnn a bit + added batching (#874) 2019-09-18 23:09:00 +01:00
torzdf
88352b0268
De-Multiprocess Extract (#871)
* requirements.txt: - Pin opencv to 4.1.1 (fixes cv2-dnn error)

* lib.face_detect.DetectedFace: change LandmarksXY to landmarks_xy. Add left, right, top, bottom attributes

* lib.model.session: Session manager for loading models into different graphs (for Nvidia + CPU)

* plugins.extract._base: New parent class for all extract plugins

* plugins.extract.pipeline. Remove MultiProcessing. Dynamically limit batchsize for Nvidia cards. Remove loglevel input

* S3FD + FAN plugins. Standardise to Keras version for all backends

* Standardize all extract plugins to new threaded codebase

* Documentation. Start implementing Numpy style docstrings for Sphinx Documentation

* Remove s3fd_amd. Change convert OTF to expect DetectedFace object

* faces_detect - clean up and documentation

* Remove PoolProcess

* Migrate manual tool to new extract workflow

* Remove AMD specific extractor code from cli and plugins

* Sort tool to new extract workflow

* Remove multiprocessing from project

* Remove multiprocessing queues from QueueManager

* Remove multiprocessing support from logger

* Move face_filter to new extraction pipeline

* Alignments landmarksXY > landmarks_xy and legacy handling

* Intercept get_backend for sphinx doc build

# Add Sphinx documentation
2019-09-15 17:07:41 +01:00
kilroythethird
da0d303c1d s3fd-amd fixes 2019-09-04 17:21:35 +02:00
torzdf
967f97f4a5 Minor extract fixups 2019-08-29 18:31:34 +00:00
kilroythethird
f8edae5887 Added s3fd-amd + minor fixes (#837) 2019-08-15 20:04:48 +01:00
kilroythethird
62c1d4346f Catch 0 size images earlier + plaidml version + minor gui update (#829) 2019-08-07 11:15:05 +01:00
torzdf
502df1e4a9 Bump S3FD VRam requiremets 2019-08-03 17:03:23 +00:00
torzdf
957fb137ed Filter small faces bugfix 2019-07-06 21:54:37 +00:00
torzdf
2f0fe704af Fixups
GUI: Fix thumbnail calculation + add borders
cv2-dnn aligner: Remove debug code
Convert: FFMpeg plugin - retry muxing audio on failure and properly error handle
2019-07-06 16:27:11 +00:00
torzdf
8e9c901aeb Bugfix: Extract - Remove BoundingBox object and replace with dict 2019-07-06 09:44:01 +00:00
torzdf
ae74e80483 Deprecation Warnings, Error Handling and Bugfix
Deprecation Warning: Rotation in Extract
Deprecation Warning: Multiple models within a single folder
Error Handling: Useful message for training size assertion error
Error Handling: Useful message for fewer images than batch size
Bugfix: BoundingBox object sometimes not available inside spawned process
2019-07-05 10:28:56 +00:00