SteganoGAN icon indicating copy to clipboard operation
SteganoGAN copied to clipboard

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

Open zhoufengfan opened this issue 4 years ago • 11 comments

  • 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 avatar Oct 15 '20 13:10 zhoufengfan

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

zhoufengfan avatar Oct 21 '20 12:10 zhoufengfan

Same for me, I used the command line.

rainyear avatar Nov 14 '20 15:11 rainyear

Has anyone solved it?could you help me?

goforself avatar Jan 19 '21 03:01 goforself

th problem from utils,the RSCODE can encode messages but often fails to decode them

------------------ 原始邮件 ------------------ 发件人: "DAI-Lab/SteganoGAN" <[email protected]>; 发送时间: 2021年1月19日(星期二) 中午11:31 收件人: "DAI-Lab/SteganoGAN"<[email protected]>; 抄送: "Subscribed"<[email protected]>; 主题: Re: [DAI-Lab/SteganoGAN] It returns "ERROR: Failed to find message.", but I have encode message in the image. (#65)

Has anyone solved it?could you help me?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

river-huang avatar Jan 19 '21 04:01 river-huang

you can change another api

---Original--- From: "Czdlx"<[email protected]> Date: Tue, Jan 19, 2021 11:31 AM To: "DAI-Lab/SteganoGAN"<[email protected]>; Cc: "Subscribed"<[email protected]>; Subject: Re: [DAI-Lab/SteganoGAN] It returns "ERROR: Failed to find message.", but I have encode message in the image. (#65)

Has anyone solved it?could you help me?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

river-huang avatar Jan 19 '21 14:01 river-huang

excuse me,how did you change the RS code in the end? l fail to run the bytearray_to_test() function

------------------ 原始邮件 ------------------ 发件人: "DAI-Lab/SteganoGAN" <[email protected]>; 发送时间: 2021年1月19日(星期二) 晚上10:37 收件人: "DAI-Lab/SteganoGAN"<[email protected]>; 抄送: "陈自东"<[email protected]>;"Comment"<[email protected]>; 主题: Re: [DAI-Lab/SteganoGAN] It returns "ERROR: Failed to find message.", but I have encode message in the image. (#65)

you can change another api

---Original--- From: "Czdlx"<[email protected]&gt; Date: Tue, Jan 19, 2021 11:31 AM To: "DAI-Lab/SteganoGAN"<[email protected]&gt;; Cc: "Subscribed"<[email protected]&gt;; Subject: Re: [DAI-Lab/SteganoGAN] It returns "ERROR: Failed to find message.", but I have encode message in the image. (#65)

Has anyone solved it?could you help me?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

goforself avatar Jan 23 '21 02:01 goforself

Same for me, Have anyone resolve this?

khangt1k25 avatar Jun 12 '21 08:06 khangt1k25

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

prot3in avatar Jul 06 '21 12:07 prot3in

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

spitzblattr avatar Jun 15 '23 04:06 spitzblattr

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

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

xbtzpx avatar Oct 16 '23 12:10 xbtzpx

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

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

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

xbtzpx avatar Oct 16 '23 12:10 xbtzpx