Skip to content

It returns "ERROR: Failed to find message.", but I have encode message in the image. #65

@zhoufengfan

Description

@zhoufengfan
  • SteganoGAN version or git commit:
  • Python version (output of python --version):
  • Pip version (output of pip --version):
  • PyTorch version (output of python -c "import torch; print(torch.__version__)"):
  • Operating System:

Description

Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.

What I Did

`import os
from steganogan import SteganoGAN

class DemoInGithub:
def init(self):
self.img_path = r"D:\lena_rgb_used_for_testing_steganogan.jpg"
self.output_img_path = r"D:\lena_rgb_used_for_testing_steganogan_outputted.jpg"
self.steganogan = SteganoGAN.load(architecture='dense')

def add_wartmark(self, msg_to_hide):
    os.system("steganogan encode " + self.img_path + " " + msg_to_hide)

def read_wartmark(self):
    os.system("steganogan decode " + self.img_path)

def add_wartmark_demo_in_github(self):
    self.steganogan.encode(self.img_path, self.output_img_path, 'This is a super secret message!')

def read_wartmark_demo_in_github(self):
    self.steganogan.decode(self.output_img_path)

if name == 'main':
demo_in_github = DemoInGithub()
# demo_in_github.add_wartmark("111111222222222333333qqqqqqqqwwwwwweeeeee")
# demo_in_github.read_wartmark()
# demo_in_github.add_wartmark_demo_in_github()
demo_in_github.read_wartmark_demo_in_github()

`

Paste (all) the command(s) you ran and the output.
If there was a crash, please include the traceback here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions