diff --git a/CHANGELOG.md b/CHANGELOG.md index cc0583d..a7b7a27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### In Progress - [Freezeable layers (encoder/decoder/etc.)](https://github.com/faceshiftlabs/DeepFaceLab/tree/feature/freezable-weights) +## [1.5.0] - 2020-03-29 +### Changed +- Web UI previews now show preview pane as PNG (loss-less), instead of JPG (lossy), so we can see the same output + as on desktop, without any changes from JPG compression. This has the side-effect of the preview images loading slower + over web, as they are now larger, a future update may be considered which would give the option to view as JPG + instead. + ## [1.4.2] - 2020-03-26 ### Fixed - Fixes bug in background power with MS-SSIM, that misattributed loss from dst to src @@ -73,7 +80,8 @@ This should help with rough areas directly next to the mask - Reset stale master branch to [seranus/DeepFaceLab](https://github.com/seranus/DeepFaceLab), 21 commits ahead of [iperov/DeepFaceLab](https://github.com/iperov/DeepFaceLab) ([compare](https://github.com/iperov/DeepFaceLab/compare/4818183...seranus:3f5ae05)) -[Unreleased]: https://github.com/faceshiftlabs/DeepFaceLab/compare/v1.4.2...HEAD +[Unreleased]: https://github.com/faceshiftlabs/DeepFaceLab/compare/v1.5.0...HEAD +[1.4.2]: https://github.com/faceshiftlabs/DeepFaceLab/compare/v1.4.2...v1.5.0 [1.4.2]: https://github.com/faceshiftlabs/DeepFaceLab/compare/v1.4.1...v1.4.2 [1.4.1]: https://github.com/faceshiftlabs/DeepFaceLab/compare/v1.4.0...v1.4.1 [1.4.0]: https://github.com/faceshiftlabs/DeepFaceLab/compare/v1.3.0...v1.4.0 diff --git a/flaskr/app.py b/flaskr/app.py index 32a4f30..b56943e 100644 --- a/flaskr/app.py +++ b/flaskr/app.py @@ -10,7 +10,7 @@ def create_flask_app(s2c, c2s, s2flask, kwargs): log = logging.getLogger('werkzeug') log.disabled = True model_path = Path(kwargs.get('saved_models_path', '')) - filename = 'preview.jpg' + filename = 'preview.png' preview_file = str(model_path / filename) def gen(): @@ -20,7 +20,7 @@ def create_flask_app(s2c, c2s, s2flask, kwargs): frame = open(preview_file, 'rb').read() except: pass - yield b'--frame\r\nContent-Type: image/jpeg\r\n\r\n' + yield b'--frame\r\nContent-Type: image/png\r\n\r\n' yield frame yield b'\r\n\r\n' @@ -81,7 +81,7 @@ def create_flask_app(s2c, c2s, s2flask, kwargs): @app.route('/preview_image') def preview_image(): - return send_file(preview_file, mimetype='image/jpeg', cache_timeout=-1) + return send_file(preview_file, mimetype='image/png', cache_timeout=-1) socketio = SocketIO(app) diff --git a/mainscripts/Trainer.py b/mainscripts/Trainer.py index dfa6d9d..dfbc0c0 100644 --- a/mainscripts/Trainer.py +++ b/mainscripts/Trainer.py @@ -404,7 +404,7 @@ def main(**kwargs): zoom) # io.show_image(wnd_name, preview_pane_image) model_path = Path(kwargs.get('saved_models_path', '')) - filename = 'preview.jpg' + filename = 'preview.png' preview_file = str(model_path / filename) cv2.imwrite(preview_file, preview_pane_image) s2flask.put({'op': 'show'})