Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sqmah/art-style-transfer-video
Art style transfer for both images and video written in Tensorflow 2. Preview and save your outputs.
https://github.com/sqmah/art-style-transfer-video
gan style-transfer tensorflow tensorflow-examples tensorflow2
Last synced: 4 months ago
JSON representation
Art style transfer for both images and video written in Tensorflow 2. Preview and save your outputs.
- Host: GitHub
- URL: https://github.com/sqmah/art-style-transfer-video
- Owner: SQMah
- Created: 2021-04-25T09:09:53.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-08T20:10:20.000Z (over 3 years ago)
- Last Synced: 2024-10-10T09:01:03.291Z (4 months ago)
- Topics: gan, style-transfer, tensorflow, tensorflow-examples, tensorflow2
- Language: Python
- Homepage:
- Size: 70.8 MB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Art-Style-Transfer-Video
Art style transfer for images and *video*. Save and resize your outputs. Example artworks included.## Setup
Use your choice of Python 3.7+ virtual environment or conda environment.
Then run:``pip install -r requirements.txt``
## Examples
Find example images to transfer art styles from in ``art``.## Video
``python video.py``Note the following arguments, which are all optional:
```
usage: video.py [-h] [--i I] [--s S] [--u U] [--r R] [--w W] [--f F]optional arguments:
-h, --help show this help message and exit
--i I, ---img_name I Image name of the artwork to transfer the style from
in the art folder.
--s S, --src S Input source. Defaults to 0 for web cam.
--u U, --url U URL to the tf hub model.
--r R, --resolution R
Resolution of the smallest dimension of the input.
--w W, --write W Whether or not to write the output.
--f F, --frame_skip F
Number of frames to skip between processing.
```## Image
``python img.py [path to input image]``Pass any image preprocessing logic (i.e. blurring) into the ``preprocess`` argument as a function. Note that the preprocessing function should return a ``numpy.ndarray``.
Note the following arguments, which are all optional except for src:
```
usage: img.py [-h] [--i I] [--u U] [--r R] [--w W] srcpositional arguments:
src Input imageoptional arguments:
-h, --help show this help message and exit
--i I, ---img_name I Image name of the artwork to transfer the style from
in the art folder.
--u U, --url U URL to the tf hub model.
--r R, --resolution R
Resolution of the smallest dimension of the input.
--w W, --write W Whether or not to write the output.
```