{"id":17983289,"url":"https://github.com/yu4u/dnn-watermark","last_synced_at":"2025-03-25T19:32:04.320Z","repository":{"id":15960086,"uuid":"79046023","full_name":"yu4u/dnn-watermark","owner":"yu4u","description":"Implementation of \"Embedding Watermarks into Deep Neural Networks,\" in Proc. of ICMR'17.","archived":false,"fork":false,"pushed_at":"2022-07-28T07:18:28.000Z","size":27,"stargazers_count":120,"open_issues_count":9,"forks_count":45,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-20T17:39:27.545Z","etag":null,"topics":["deep-learning","deep-neural-networks","keras","watermak"],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/1701.04082","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yu4u.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-15T16:58:37.000Z","updated_at":"2025-03-17T07:44:10.000Z","dependencies_parsed_at":"2022-08-07T08:01:25.764Z","dependency_job_id":null,"html_url":"https://github.com/yu4u/dnn-watermark","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yu4u%2Fdnn-watermark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yu4u%2Fdnn-watermark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yu4u%2Fdnn-watermark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yu4u%2Fdnn-watermark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yu4u","download_url":"https://codeload.github.com/yu4u/dnn-watermark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245530380,"owners_count":20630549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","deep-neural-networks","keras","watermak"],"created_at":"2024-10-29T18:16:42.595Z","updated_at":"2025-03-25T19:32:03.716Z","avatar_url":"https://github.com/yu4u.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Embedding Watermarks into Deep Neural Networks\n====\nThis code is the implementation of \"Embedding Watermarks into Deep Neural Networks\" [1]. It embeds a digital watermark into deep neural networks in training the host network. This embedding is achieved by a parameter regularizer.\n\nThis README will be updated later for more details.\n\n## Requirements\nKeras 1.1.2 (\u003c1.2.0), tensorflow 0.12.1 (\u003c1.0.0), numpy, matplotlib, pandas\n\n **[CAUTION]**\nWe found that custom regularizers had been deprecated in the latest versions of Keras as discussed [here](https://github.com/fchollet/keras/pull/4703).\n\n\u003e Custom regularizers may no longer work.\n\nTherefore please use the old versions of Keras and TensorFlow.\n(keras 1.1.2 does not work on tensorflow \u003e= 1.0.)\n\n```sh\npip install keras==1.1.2\npip install tensorflow==0.12.1\npip install tensorflow-gpu==0.12.1\n```\n\n\n\n## Usage\nEmbed a watermark in training a host network:\n\n```sh\n# train the host network while embedding a watermark\npython train_wrn.py config/train_random_min.json\n\n# extract the embedded watermark\npython utility/wmark_validate.py result/wrn_WTYPE_random_DIM256_SCALE0.01_N1K4B64EPOCH3_TBLK1.weight result/wrn_WTYPE_random_DIM256_SCALE0.01_N1K4B64EPOCH3_TBLK1_layer7_w.npy result/random\n```\n\nTrain the host network *without* embedding:\n\n```sh\n# train the host network without embedding\npython train_wrn.py config/train_non_min.json \n\n# extract the embedded watermark (meaningless because no watermark was embedded)\npython utility/wmark_validate.py result/wrn_WTYPE_random_DIM256_SCALE0.01_N1K4B64EPOCH3_TBLK0.weight result/wrn_WTYPE_random_DIM256_SCALE0.01_N1K4B64EPOCH3_TBLK1_layer7_w.npy result/non\n\n# visualize the embedded watermark\npython utility/draw_histogram_signature.py config/draw_histogram_non.json hist_signature_non.png\n```\n\nExtracted watermarks from the embedded host network and the non-embedded networks:\n\n![](images/hist_signature_non.png)\n\n## License\nAll codes are provided for research purposes only and without any warranty.\nWhen using any code in this project, we would appreciate it if you could refer to this project.\n\n\n## References\n[1] Y. Uchida, Y. Nagai, S. Sakazawa, and S. Satoh, \"Embedding Watermarks into Deep Neural Networks,\" ICMR, 2017.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyu4u%2Fdnn-watermark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyu4u%2Fdnn-watermark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyu4u%2Fdnn-watermark/lists"}