diff --git a/docs/_static/theme_overrides.css b/docs/_static/theme_overrides.css deleted file mode 100644 index abc9c0f..0000000 --- a/docs/_static/theme_overrides.css +++ /dev/null @@ -1,14 +0,0 @@ -/* override table width restrictions */ -@media screen and (min-width: 767px) { - - .wy-table-responsive table td { - /* !important prevents the common CSS stylesheets from overriding - this as on RTD they are loaded after this stylesheet */ - white-space: normal !important; - } - - .wy-table-responsive { - overflow: visible !important; - } - } - \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index bbd311d..d805083 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,13 +12,19 @@ # import os import sys +from unittest import mock + sys.path.insert(0, os.path.abspath('../')) sys.setrecursionlimit(1500) +MOCK_MODULES = ["plaidml", "pynvx"] +for mod_name in MOCK_MODULES: + sys.modules[mod_name] = mock.Mock() + # -- Project information ----------------------------------------------------- project = 'faceswap' -copyright = '2019, faceswap.dev' +copyright = '2022, faceswap.dev' author = 'faceswap.dev' # The full version, including alpha/beta/rc tags @@ -31,6 +37,7 @@ release = '0.99' # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = ['sphinx.ext.napoleon', "sphinx.ext.autosummary", ] +napoleon_custom_sections = ['License'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -61,12 +68,6 @@ latext_logo = '_static/logo.png' # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] -html_context = { - 'css_files': [ - '_static/theme_overrides.css', # override wide tables in RTD theme - ], - } - master_doc = 'index' autosummary_generate = True diff --git a/docs/full/lib/model.rst b/docs/full/lib/model.rst index 2b8875f..3430d2d 100755 --- a/docs/full/lib/model.rst +++ b/docs/full/lib/model.rst @@ -64,15 +64,16 @@ be imported as :mod:`lib.model.losses` depending on the backend in use. .. autosummary:: :nosignatures: - ~lib.model.loss.perceptual_loss_tf.DSSIMObjective ~lib.model.loss.loss_tf.FocalFrequencyLoss ~lib.model.loss.loss_tf.GeneralizedLoss - ~lib.model.loss.perceptual_loss_tf.GMSDLoss ~lib.model.loss.loss_tf.GradientLoss ~lib.model.loss.loss_tf.LaplacianPyramidLoss ~lib.model.loss.loss_tf.LInfNorm ~lib.model.loss.loss_tf.LossWrapper ~lib.model.loss.feature_loss_tf.LPIPSLoss + ~lib.model.loss.perceptual_loss_tf.DSSIMObjective + ~lib.model.loss.perceptual_loss_tf.GMSDLoss + ~lib.model.loss.perceptual_loss_tf.LDRFLIPLoss ~lib.model.loss.perceptual_loss_tf.MSSIMLoss .. automodule:: lib.model.loss.loss_tf diff --git a/docs/sphinx_requirements.txt b/docs/sphinx_requirements.txt index 2f84ab7..b4c0fc2 100755 --- a/docs/sphinx_requirements.txt +++ b/docs/sphinx_requirements.txt @@ -1,20 +1,21 @@ # NB Do not install from this requirements file # It is for documentation purposes only -tqdm==4.62 +sphinx==5.0.2 +sphinx_rtd_theme-1.0.0 +tqdm==4.64 psutil==5.8.0 -numpy==1.18.0 -opencv-python>4.5.3.0,<4.5.4.0 +numpy>=1.18.0 +opencv-python>=4.5.5.0 pillow==8.3.1 -scikit-learn==0.24.2 -fastcluster==1.1.26 +scikit-learn>=1.0.2 +fastcluster>=1.2.4 matplotlib==3.5.1 imageio==2.9.0 -imageio-ffmpeg==0.4.5 +imageio-ffmpeg==0.4.7 ffmpy==0.2.3 -nvidia-ml-py3 -pywin32==228 ; sys_platform == "win32" -pynvx==1.0.0 ; sys_platform == "darwin" -plaidml-keras==0.7.0 -tensorflow==2.2.0 -typing-extensions +nvidia-ml-py<11.515 +plaidml==0.7.0 +tensorflow>=2.8.0,<2.9.0 +tensorflow_probability<0.17 +typing-extensions>=4.0.0 diff --git a/lib/keras_utils.py b/lib/keras_utils.py index 435c04e..aa472ad 100644 --- a/lib/keras_utils.py +++ b/lib/keras_utils.py @@ -180,8 +180,8 @@ class ColorSpaceConvert(): # pylint:disable=too-few-public-methods The conversion in both directions is the same, but the mappping matrix for XYZ to RGB is the inverse of RGB to XYZ. - Reference - --------- + References + ---------- https://www.image-engineering.de/library/technotes/958-how-to-convert-between-srgb-and-ciexyz Parameters diff --git a/lib/model/nets.py b/lib/model/nets.py index 1acffe3..b4c01bc 100644 --- a/lib/model/nets.py +++ b/lib/model/nets.py @@ -48,8 +48,8 @@ class AlexNet(_net): # pylint:disable=too-few-public-methods ----- This port only contains the features portion of the model. - Reference - --------- + References + ---------- https://papers.nips.cc/paper/2012/file/c399862d3b9d6b76c8436e924a68c45b-Paper.pdf Parameters @@ -144,8 +144,8 @@ class SqueezeNet(_net): # pylint:disable=too-few-public-methods ----- This port only contains the features portion of the model. - Reference - --------- + References + ---------- https://arxiv.org/abs/1602.07360 Parameters