RivaGAN
stegobox.codec.RivaGAN
Bases: BaseCodec
This implementation of the RivaGAN is from ShieldMnt/invisible-watermark which provides a pretrained onnx model for the RivaGAN encoder and decoder.
The original implementation of RivaGAN is from source code: DAI-Lab/RivaGAN and paper: Robust Invisible Video Watermarking with Attention - https://arxiv.org/abs/1909.01285.
Tip: Encoded payload of this method is limited to 32 bytes.
Source code in stegobox/codec/invisible_watermark/riva_gan.py
encode(carrier, payload)
Encodes payload string into a frame of a video with a RivaGAN encoder.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
carrier |
Mat
|
The carrier frame, read with |
required |
payload |
str
|
The payload string. |
required |
Returns:
Type | Description |
---|---|
Mat
|
The encoded image, write with |
Source code in stegobox/codec/invisible_watermark/riva_gan.py
decode(carrier)
Decodes payload string from a frame of a video with a RivaGAN decoder.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
carrier |
Mat
|
The carrier frame, read with |
required |
Returns:
Type | Description |
---|---|
str
|
The decoded payload string. |