From c8d8e7a54d6ad4dfb8b46758a76f60bd239d1c6d Mon Sep 17 00:00:00 2001 From: Zheyu Fu <166843990+GaryFuzheyu@users.noreply.github.com> Date: Mon, 22 Dec 2025 21:09:13 +0800 Subject: [PATCH 01/10] Update index.rst --- docs/index.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 0ca7264..334afa4 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -64,15 +64,20 @@ Key Features :width: 100% :align: center +| +| A Quick Example of Generating and Detecting Watermarked Image via MarkDiffusion Toolkit ---------------- +----------------------------------------------------------------------------------------- .. image:: ../img/A_Quick_Example.png :alt: A quick example of generating and detecting watermarked image via MarkDiffusion toolkit :width: 100% :align: center +| +| + Documentation Contents ---------------------- @@ -84,7 +89,7 @@ Documentation Contents .. toctree:: :maxdepth: 2 - :caption: Background Information and + :caption: Background Info & Detailed Guidance user_guide/algorithms From 57e27f575b26afb9fc573b74470e2f28f4e3c6ec Mon Sep 17 00:00:00 2001 From: Zheyu Fu <166843990+GaryFuzheyu@users.noreply.github.com> Date: Mon, 22 Dec 2025 21:09:37 +0800 Subject: [PATCH 02/10] Update comprehensive_test.rst --- docs/test_system/comprehensive_test.rst | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/docs/test_system/comprehensive_test.rst b/docs/test_system/comprehensive_test.rst index 79d5569..b650158 100644 --- a/docs/test_system/comprehensive_test.rst +++ b/docs/test_system/comprehensive_test.rst @@ -7,8 +7,8 @@ This comprehensive test module is located in the ``test/`` directory. Test Coverage Statistics ------------------------ -- **Total Test Cases**: 454 unit tests -- **Code Coverage**: Approximately 90% +- **Total Test Cases**: 658 unit tests +- **Code Coverage**: Approximately 95% - **Coverage Scope**: Nearly all functional modules - **Uncovered Code**: Primarily exception handling and edge case logic @@ -19,8 +19,6 @@ Test Structure The test suite is organized into several test files: -Core Functionality Tests -~~~~~~~~~~~~~~~~~~~~~~~~ **test_watermark_algorithms.py** Tests for initialization, generation, detection, inversion, and visualization of all watermark algorithms. @@ -31,9 +29,6 @@ Core Functionality Tests **test_dataset.py** Tests for dataset classes (StableDiffusionPromptsDataset, MSCOCODataset, VBenchDataset). -Utility and Module Tests -~~~~~~~~~~~~~~~~~~~~~~~~~ - **test_utils.py** Tests for utility functions used throughout the toolkit. @@ -46,6 +41,9 @@ Utility and Module Tests **test_video_editor.py** Tests for video editing modules. +**test_edge_cases.py** + Tests for some edge cases. + Running the Tests ----------------- From e88d79df095350c876b68cd41b489cbbdb1af927 Mon Sep 17 00:00:00 2001 From: Zheyu Fu <166843990+GaryFuzheyu@users.noreply.github.com> Date: Mon, 22 Dec 2025 21:10:12 +0800 Subject: [PATCH 03/10] Update quickstart.rst --- docs/quickstart.rst | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/quickstart.rst b/docs/quickstart.rst index fa11df9..a608a7f 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -1,15 +1,14 @@ -Quick Start -=========== +.. _quickstart: Google Colab Demo ------------------ +================= If you're interested in trying out MarkDiffusion without installing anything, you can use `Google Colab `_ to see how it works. Installation ------------- +============ **(Recommended)** We released PyPI package for MarkDiffusion. You can install it directly with pip: @@ -35,7 +34,7 @@ conda-forge package, which can be installed with the following commands: be included in the release. You will need to install those separately if necessary. How to Use the Toolkit ----------------------- +====================== After installation, there are two ways to use MarkDiffusion: @@ -148,7 +147,7 @@ via the markdiffusion library—please review it for guidance. Here's a quick ex print(detection_result) Next Steps ----------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Now that you're familiar with the basics, explore more: From 0a7648aec18db1a111759fb4c6bbd8cf3c7712c2 Mon Sep 17 00:00:00 2001 From: Zheyu Fu <166843990+GaryFuzheyu@users.noreply.github.com> Date: Mon, 22 Dec 2025 21:26:19 +0800 Subject: [PATCH 04/10] Update conf.py --- docs/conf.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 9f4b19c..f234ec9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -80,6 +80,11 @@ # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] +# Custom CSS files +html_css_files = [ + 'custom.css', +] + # Custom sidebar templates, must be a dictionary that maps document names # to template names. html_sidebars = { From a75e0086dc6721edd2e4f9f4868506927bf8940b Mon Sep 17 00:00:00 2001 From: Zheyu Fu <166843990+GaryFuzheyu@users.noreply.github.com> Date: Mon, 22 Dec 2025 21:26:50 +0800 Subject: [PATCH 05/10] Add files via upload --- docs/_static/custom.css | 137 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 docs/_static/custom.css diff --git a/docs/_static/custom.css b/docs/_static/custom.css new file mode 100644 index 0000000..9f465fa --- /dev/null +++ b/docs/_static/custom.css @@ -0,0 +1,137 @@ +/* Custom CSS for MarkDiffusion Documentation */ + +/* Increase sidebar width and ensure no gap */ +.wy-nav-side { + width: 350px !important; + left: 0 !important; +} + +/* Ensure sidebar top section (purple area) matches width */ +.wy-side-nav-search { + width: 350px !important; + box-sizing: border-box !important; + margin: 0 !important; + padding: 1.618em !important; +} + +/* Ensure menu items match sidebar width */ +.wy-menu.wy-menu-vertical { + width: 350px !important; + box-sizing: border-box !important; + margin: 0 !important; + padding: 0 !important; +} + +/* Ensure highlighted/current items fill the width */ +.wy-menu-vertical li.current { + width: 350px !important; +} + +.wy-menu-vertical li.current > a { + width: 100% !important; + box-sizing: border-box !important; +} + +/* Hide sidebar scrollbar and prevent it from taking space */ +.wy-side-scroll { + overflow-y: scroll !important; + scrollbar-width: none !important; /* Firefox */ + -ms-overflow-style: none !important; /* IE and Edge */ + width: 100% !important; +} + +.wy-side-scroll::-webkit-scrollbar { + display: none !important; /* Chrome, Safari and Opera */ + width: 0 !important; + height: 0 !important; +} + +/* Ensure the navigation container fills the entire sidebar */ +.wy-side-nav-search, +.wy-menu.wy-menu-vertical { + overflow-x: hidden !important; +} + +/* Adjust content area to accommodate wider sidebar */ +.wy-nav-content-wrap { + margin-left: 350px !important; +} + +/* Increase max width of content area to use more screen space */ +.wy-nav-content { + max-width: 1200px !important; +} + +/* Make the overall page wider on large screens */ +@media screen and (min-width: 1400px) { + .wy-nav-side { + width: 380px !important; + left: 0 !important; + } + + .wy-side-nav-search { + width: 380px !important; + box-sizing: border-box !important; + } + + .wy-menu.wy-menu-vertical { + width: 380px !important; + box-sizing: border-box !important; + } + + .wy-menu-vertical li.current { + width: 380px !important; + } + + .wy-nav-content-wrap { + margin-left: 380px !important; + } + + .wy-nav-content { + max-width: 1400px !important; + } +} + +/* Ensure sidebar text wraps properly with the increased width */ +.wy-menu-vertical li.toctree-l1 > a, +.wy-menu-vertical li.toctree-l2 > a, +.wy-menu-vertical li.toctree-l3 > a { + white-space: normal !important; + line-height: 1.4 !important; + padding: 0.4045em 1.618em !important; + width: 100% !important; + box-sizing: border-box !important; +} + +/* Add slight padding to long navigation items */ +.wy-menu-vertical li.current > a { + padding: 0.4045em 1.618em !important; + width: 100% !important; + box-sizing: border-box !important; +} + +/* Ensure all list items fill the width */ +.wy-menu-vertical li { + width: 100% !important; +} + +/* Ensure current item background fills the width */ +.wy-menu-vertical li.current > a, +.wy-menu-vertical li.on a, +.wy-menu-vertical li.current > a:hover, +.wy-menu-vertical li.on a:hover { + background: #e3e3e3 !important; + width: 100% !important; + box-sizing: border-box !important; +} + +/* Ensure nested menu items also fill width */ +.wy-menu-vertical ul { + width: 100% !important; +} + +.wy-menu-vertical ul li a { + width: 100% !important; + box-sizing: border-box !important; +} + From 0e575861639e6e64cbe62e0e40b05dc90f80206c Mon Sep 17 00:00:00 2001 From: Zheyu Fu <166843990+GaryFuzheyu@users.noreply.github.com> Date: Mon, 22 Dec 2025 21:31:52 +0800 Subject: [PATCH 06/10] Update index.rst --- docs/index.rst | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 334afa4..10fab04 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -17,10 +17,6 @@ MarkDiffusion Documentation :target: https://colab.research.google.com/drive/1N1C9elDAB5zwF4FxKKYMCqR3eSpCSqAW?usp=sharing :alt: Colab -.. image:: https://img.shields.io/badge/Readthedocs-%2300A89C?style=for-the-badge&logo=readthedocs&logoColor=%238CA1AF - :target: https://markdiffusion.readthedocs.io - :alt: DOC - .. image:: https://img.shields.io/badge/PYPI-%23193440?style=for-the-badge&logo=pypi&logoColor=%233775A9 :target: https://pypi.org/project/markdiffusion :alt: PYPI @@ -129,3 +125,4 @@ Indices and tables * :ref:`modindex` * :ref:`search` + From 386c0057a3bfd5a0cee9ee2b93b1bc3a29757c88 Mon Sep 17 00:00:00 2001 From: Zheyu Fu <166843990+GaryFuzheyu@users.noreply.github.com> Date: Mon, 22 Dec 2025 21:37:02 +0800 Subject: [PATCH 07/10] Update index.rst --- docs/index.rst | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 10fab04..188d9dd 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -55,6 +55,8 @@ Key Features With 31 evaluation tools covering detectability, robustness, and impact on output quality, MarkDiffusion provides comprehensive assessment capabilities with 6 automated evaluation pipelines. +| + .. image:: ../img/fig1_overview.png :alt: MarkDiffusion Overview :width: 100% @@ -66,6 +68,8 @@ Key Features A Quick Example of Generating and Detecting Watermarked Image via MarkDiffusion Toolkit ----------------------------------------------------------------------------------------- +| + .. image:: ../img/A_Quick_Example.png :alt: A quick example of generating and detecting watermarked image via MarkDiffusion toolkit :width: 100% @@ -85,8 +89,7 @@ Documentation Contents .. toctree:: :maxdepth: 2 - :caption: Background Info & - Detailed Guidance + :caption: Background & Detailed Guidance user_guide/algorithms user_guide/watermarking @@ -118,11 +121,3 @@ Documentation Contents citation resources -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` - - From 47f8ad03f10eb008ee7d774716c6f8277d8fe443 Mon Sep 17 00:00:00 2001 From: Zheyu Fu <166843990+GaryFuzheyu@users.noreply.github.com> Date: Mon, 22 Dec 2025 21:37:41 +0800 Subject: [PATCH 08/10] Update custom.css --- docs/_static/custom.css | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/_static/custom.css b/docs/_static/custom.css index 9f465fa..5b9f642 100644 --- a/docs/_static/custom.css +++ b/docs/_static/custom.css @@ -135,3 +135,21 @@ box-sizing: border-box !important; } +/* Remove purple color from visited links */ +.wy-menu-vertical a:visited { + color: #404040 !important; +} + +.wy-menu-vertical a:link { + color: #404040 !important; +} + +/* Ensure content area links also don't turn purple */ +.wy-nav-content a:visited { + color: #2980B9 !important; +} + +.wy-nav-content a:link { + color: #2980B9 !important; +} + From 4119377169a872ae07c549ae6fbd4b05850b6dc5 Mon Sep 17 00:00:00 2001 From: Zheyu Fu <166843990+GaryFuzheyu@users.noreply.github.com> Date: Mon, 22 Dec 2025 21:41:40 +0800 Subject: [PATCH 09/10] Update index.rst --- docs/index.rst | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 188d9dd..2b5f4cc 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -55,8 +55,6 @@ Key Features With 31 evaluation tools covering detectability, robustness, and impact on output quality, MarkDiffusion provides comprehensive assessment capabilities with 6 automated evaluation pipelines. -| - .. image:: ../img/fig1_overview.png :alt: MarkDiffusion Overview :width: 100% @@ -68,8 +66,6 @@ Key Features A Quick Example of Generating and Detecting Watermarked Image via MarkDiffusion Toolkit ----------------------------------------------------------------------------------------- -| - .. image:: ../img/A_Quick_Example.png :alt: A quick example of generating and detecting watermarked image via MarkDiffusion toolkit :width: 100% @@ -89,7 +85,8 @@ Documentation Contents .. toctree:: :maxdepth: 2 - :caption: Background & Detailed Guidance + :caption: Background Info & + Detailed Guidance user_guide/algorithms user_guide/watermarking @@ -121,3 +118,4 @@ Documentation Contents citation resources + From 756215ebd6550bb3d8c57d7673f7f02ab21ec558 Mon Sep 17 00:00:00 2001 From: Zheyu Fu <166843990+GaryFuzheyu@users.noreply.github.com> Date: Mon, 22 Dec 2025 21:43:29 +0800 Subject: [PATCH 10/10] Update custom.css --- docs/_static/custom.css | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/docs/_static/custom.css b/docs/_static/custom.css index 5b9f642..3aab610 100644 --- a/docs/_static/custom.css +++ b/docs/_static/custom.css @@ -135,16 +135,7 @@ box-sizing: border-box !important; } -/* Remove purple color from visited links */ -.wy-menu-vertical a:visited { - color: #404040 !important; -} - -.wy-menu-vertical a:link { - color: #404040 !important; -} - -/* Ensure content area links also don't turn purple */ +/* Remove purple color from visited links in content area */ .wy-nav-content a:visited { color: #2980B9 !important; }