207 Commits

Author SHA1 Message Date
torzdf 03d2d179a9 scripts.extract - Save jpg thumbnails to alignments file 2020-07-09 11:41:03 +00:00
bryanlyon 92bc9af957 Extraction: Added an option to skip outputting face images (#1021) 2020-05-13 11:28:30 +00:00
torzdf cbba53ea67 Core Updates (#1015)
- Remove lib.utils.keras_backend_quiet and replace with get_backend() where relevant
- Document lib.gpu_stats and lib.sys_info
- Remove call to GPUStats.is_plaidml from convert and replace with get_backend()
- lib.gui.menu - typofix
2020-04-24 16:41:27 +01:00
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 9461c59773 Bugfixes and minor updates:
- Remove preview option from effmpeg tool
  - Remove json filetypes from GUI for alignments files
  - Capture and raise empty timelapse folder errors
  - Move convert to use centralized ImagesLoader
2020-04-09 14:33: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 3d88630f4f Core Update (#995)
* lib.alignments - Add Video Meta Data methods

* lib.image - Monkey Path ImageIO for video scanning
2020-03-23 13:15:21 +00:00
torzdf 2b5b871156 lib.alignments - Slight update (#978)
* lib.alignments update:
  - Minor structure change (faces to nested dictionary)
  - Refactor internal and external methods
  - Documentation
2020-03-02 17:13:32 +00:00
xirvian 4483553195 Fix no-augment-color deprecation warning (#972)
* Update sphinx_requirements.txt

* Fix no-augment-color deprecation warning

Co-authored-by: torzdf <36920800+torzdf@users.noreply.github.com>
2020-02-21 11:45:21 +00:00
torzdf 497779d293 lib.gui
Centralize get_scaling and set_geometry to utils.config
Suppress Error when rebuilding GUI for TreeView
2019-12-31 17:27:45 +00:00
torzdf 1bdc9da02f Smart Masks to Convert (#957)
- scripts.convert - Use Smart Masks for Convert
    * Make on-the-fly conversion an explicit option

- Move BlurMask to lib.faces_detect

- tools.preview - Fix for smart masks
    * Subclass from tk.Tk
    * Options to lib.gui.control_helper
    *variable cleanup

- lib.logger - Demote more tensorflow deprecation messages

- Documentation:
    * lib.faces_detect.BlurMask
    * plugins.convert.mask
    * lib.convert
    * scripts.convert
    * scripts.fsmedia
    * tools.preview
2019-12-29 23:13:25 +00:00
kvrooman e1d832f383 Clarification of Phases in Extract (#949)
* Clarification of Phases

When multi-processing, the status bar description lists the phase as only Detect. This is misleading and there likely should be a reference to the multiple simutaneous phases being run.

* Simplify Communication
2019-12-15 12:51:30 +00:00
torzdf c1e6080d92 Training: Cleaner loss printing 2019-12-12 13:27:14 +00:00
torzdf 6efed85490 lib,cli: Add suppressed colab flag 2019-12-12 01:22:02 +00:00
torzdf ef03be1706 Update Dependencies (#950)
* 1st Round update for Python 3.7, TF1.15, Keras2.3
    Move Tensorflow logging verbosity prior to first tensorflow import
    Keras Optimizers and nn_block update
    lib.logger - Change tf deprecation messages from WARNING to DEBUG
    Raise Tensorflow Max version check to 1.15
    Update requirements and conda check for python 3.7+
    Update install scripts, travis and documentation to Python 3.7

* Revert Keras to 2.2.4
2019-12-10 02:01:20 +00:00
torzdf 43a4d06540 Smart Masks - Training Implementation (#914)
* Smart Masks - Training

- Reinstate smart mask training code
- Reinstate mask_type back to model.config
- change 'replicate_input_mask to 'learn_mask'
- Add learn mask option
- Add mask loading from alignments to plugins.train.trainer
- Add mask_blur and mask threshold options
- _base.py - Pass mask options through training_opts dict
- plugins.train.model - check for mask_type not None for learn_mask and penalized_mask_loss
- Limit alignments loading to just those faces that appear in the training folder
- Raise error if not all training images have an alignment, and alignment file is required
- lib.training_data - Mask generation code
- lib.faces_detect - cv2 dimension stripping bugfix
- Remove cv2 linting code

* Update mask helptext in cli.py

* Fix Warp to Landmarks
Remove SHA1 hashing from training data

* Update mask training config

* Capture missing masks at training init

* lib.image.read_image_batch - Return filenames with batch for ordering

* scripts.train - Documentation

* plugins.train.trainer - documentation

* Ensure backward compatibility.
Fix convert for new predicted masks

* Update removed masks to components for legacy models.
2019-12-05 16:02:01 +00:00
torzdf 28442837cd bugfix - Convert - On-The-Fly to conversion to ExtractMedia object 2019-12-02 13:08:14 +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
torzdf a6d77fc645 bugfix: lib.gui - Remove last session file if user selects not to load 2019-11-23 15:23:45 +00:00
torzdf dba5ccdd13 bugfix: scripts.train - Check images are in input folders 2019-11-23 14:07:55 +00:00
torzdf 9c588045aa GUI Updates (#940)
* lib.gui: Update icons
* tools.cli: Add video filetype flag to mask input
* lib.gui.popup_configure: Refresh GUI on config save
* lib.gui._config: Add Icon size and load last session options
* lib.gui.control_helper - Add control modification tracking
* lib.gui - Add Projects and Last Session
- Main root title handled by projects
- Add Hotkeys
- Create projects module
- split fsw and fst filetypes
- Add last_session saving

* lib.project
- Documentation
- Ask confirm on closing unsaved project
-Fixups

* Track model folder changes
- Shuffle some globals
- Activate System Verbosity for GUI

* lib.gui.utils - Documentation and clean up
- lib.gui.custom_widgets - Create and document

* Add GUI config option to disable auto loading model stats
2019-11-22 19:20:23 +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
torzdf 57b24dfedb Bugfix: Extract - Fix serial processing 2019-11-14 12:31:13 +00:00
torzdf 2921c2e51a scripts.fsmedia - remove blurry face filter. Fix debug landmarks 2019-11-14 00:23:09 +00:00
torzdf baac4f53bf extract bugfixes - post_processing, correctly reference aligned face 2019-11-13 22:05:44 +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
torzdf 0dcef3c859 scripts.convert - add allow growth option 2019-11-03 23:04:16 +00:00
torzdf 11ab910c5e Reinstate fast frame count for convert and extract. Exit early if count is wrong. 2019-10-31 11:55:51 +00:00
torzdf b1dd0dbdc5 bugfix: lib.image - Ensure video frame count is always read correctly 2019-10-31 01:45:27 +00:00
torzdf 701b2f1f51 Minor Fixes
scripts.train - default to .fsa alignments file
setup.py - Lower non-root message to info level
2019-10-25 17:18:04 +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 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 3deb79392d Merge branch 'staging' into smart-mask-alpha 2019-10-12 09:41:19 +00:00
torzdf e35918cadf Standardize serialization (#903)
* Standardize serialization

- Linting
- Standardize serializer use throughout code
- Extend serializer to load and save files
- Always load and save in utf-8
- Create documentation
2019-10-10 23:11:12 +01:00
kvrooman 995a857154 Smart Mask Exposure for Extraction & Training (#831)
Smart Masks - Initial Commit
2019-10-07 16:16:18 +01:00
torzdf bf2510dfc4 Force imageio to use ffmpeg 2019-09-29 00:33:28 +01:00
torzdf 174e6950ea Logging format fixes 2019-09-25 13:01:24 +01:00
torzdf e83819fcb4 Deprecation warning update 2019-09-24 22:26:21 +00:00
torzdf 5110315df2 no-flip & no-augment-color deprecation warnings 2019-09-24 21:58:42 +00: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 78bd012a99 Align Eyes Deprecation - Bugfixes, Linting, and warning removal 2019-09-24 11:19:58 +01:00
kvrooman 139b581177 Align eyes deprecation (#851)
* align eyes removal

* add align_eyes tool
2019-09-24 11:16:03 +01:00
torzdf a766891e1f align-eyes deprecation warning 2019-09-17 09:15:43 +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
torzdf f0833012a1 De-Multiprocess Convert (#857)
* Convert: Swap MP pool for Thread pool
2019-09-02 22:55:36 +01:00
torzdf 00990c4a35 Gui Updates (#847)
* GUI Improvements

 - Add basic GUI Config options (available in settings menu)
 - Dynamically add/remove columns on settings panel resize
 - Wrap text properly on info headers
 - Fix helptext formatting for configs
 - Standardize Tooltip widths
 - [code] Apply some widget naming
 - [code] Rename radio_columns to option_columns
 - [code] fix column count checking
 - Add Starting Tab config item
 - Add info boxes to main pages
 - Global font settings
 - Add resources to help menu
2019-08-27 23:52:04 +01:00
kilroythethird 66a31fecb2 Optimized numpy functions in Converter (#838) 2019-08-25 12:14:52 +01:00
torzdf b36b527276 GUI Tweaks
- Fix tootlp formatting
- Revert to single column view
- Fix borders on ungrouped items
- Add individual tooltips for Radio options
- Add more groups
- Remove forced fullscreen
2019-08-25 00:16:56 +01:00