# ml-model-watermarking
**Repository Path**: mirrors_SAP/ml-model-watermarking
## Basic Information
- **Project Name**: ml-model-watermarking
- **Description**: Protect your machine learning models easily and securely with watermarking 🔑
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 0
- **Created**: 2021-11-05
- **Last Updated**: 2026-02-14
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
## Important Notice
This public repository is read-only and no longer maintained.

---
Protect your machine learning models easily and securely with watermarking :key:
--- The concept of digital watermarking has been known for 30 years, mainly for image and audio contents. The goal is to insert a unique, hidden and non-removable signal in the original content, to be used as an identifier. If a thief steals a content, the original owner can still prove his/her ownership. ML Model Watermarking offers basic primitives for researchers and machine learning enthusiasts to watermark their models, without advanced knowledge of underlying concepts. * :book: Watermark models on various tasks, such as **image classification** or **sentiment analysis**, with a compatibility with the main Machine Learning frameworks like [Scikit-learn](https://github.com/scikit-learn/scikit-learn), [Pytorch](https://github.com/pytorch/pytorch) or the [HuggingFace library](https://github.com/huggingface/transformers). * :triangular_flag_on_post: Detect if one of your models has been used without consent. * :chart_with_upwards_trend: Integrate watermark in your pipeline, with a negligible accuracy loss. ## Installation Simply run: ``` python >>> pip install . ``` ## How to use it ML Model Watermarking acts as a wrapper for your model, provoding a range of techniques for watermarking your model as well as ownership detection function. After the watermarking phase, you can retrieve your model and save the ownership information. ``` python >>> from mlmodelwatermarking.markface import TrainerWM >>> trainer = TrainerWM(model=your_model) >>> ownership = trainer.watermark() >>> watermarked_model = trainer.get_model() ``` Later, it is possible verify if a given model has been stolen based on the ownership information ``` python >>> from mlmodelwatermarking.marktorch import TrainerWM >>> from mlmodelwatermarking.verification import verify >>> trainer = TrainerWM(model=suspect_model, ownership=ownership) >>> trainer.verify() {'is_stolen': True, 'score': 0.88, 'threshold': 0.66} ``` ## References The library implements several ideas presented in academic papers: