Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zhoufengfan opened this issue Oct 15, 2020 · 11 comments

Comments

@zhoufengfan
Copy link

  • 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.
@zhoufengfan
Copy link
Author

It's all the output. You can review it.

@rainyear
Copy link

Same for me, I used the command line.

@goforself
Copy link

Has anyone solved it?could you help me?

@river-huang
Copy link

river-huang commented Jan 19, 2021 via email

@river-huang
Copy link

river-huang commented Jan 19, 2021 via email

@goforself
Copy link

goforself commented Jan 23, 2021 via email

@khangt1k25
Copy link

Same for me, Have anyone resolve this?

@prot3in
Copy link

prot3in commented Jul 6, 2021

hello,i met the same problem.But,when i change the steganogan's version to 0.1.0, all the problems disapeared.

@spitzblattr
Copy link

hello, my version is 0.1.3
The image format you encode must be the same as the format of your train dataset
For example, if you train your network with .png files, then you must encode a png format file, or it will not find message
And for me, if I don't use my trained model but use the pretrained models instead, the decoder will never find message and I don't know why

@xbtzpx
Copy link

xbtzpx commented Oct 16, 2023

您好,我遇到了同样的问题。但是,当我将 steganogan 的版本更改为 0.1.0 时,所有问题都消失了。

How do I change the version? Will the decoder work after the change?

@xbtzpx
Copy link

xbtzpx commented Oct 16, 2023

您好,我的版本是 0.1.3 编码的图像格式必须与训练数据集的格式相同 例如,如果您使用 .png 文件训练网络,则必须对 png 格式文件进行编码,否则它将找不到消息 对我来说,如果我不使用经过训练的模型,而是使用预训练的模型, 解码器永远不会找到消息,我不知道为什么

您好,我的版本是 0.1.3 编码的图像格式必须与训练数据集的格式相同 例如,如果您使用 .png 文件训练网络,则必须对 png 格式文件进行编码,否则它将找不到消息 对我来说,如果我不使用经过训练的模型,而是使用预训练的模型, 解码器永远不会找到消息,我不知道为什么

Hello, does your decoder work? Do you train encoders and decoders yourself?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants