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

ERROR: invalid literal for int() with base 2: 'TrueFalseTrueTrueTrueTrueTrueTrue' #70

Open
nekomeowww opened this issue Feb 28, 2022 · 4 comments

Comments

@nekomeowww
Copy link

  • SteganoGAN version or git commit: 0.1.2
  • Python version (output of python --version): 3.7
  • Pip version (output of pip --version): 21.2.4
  • PyTorch version (output of python -c "import torch; print(torch.__version__)"): 1.10.2+cu102
  • Operating System: Docker image python:3.7-bulleye on Docker Desktop of macOS
  • Pip freeze:
imageio==2.16.1
numpy==1.21.5
Pillow==9.0.1
reedsolo==1.5.4
scipy==1.7.3
steganogan==0.1.2
torch==1.10.2
torchvision==0.11.3
tqdm==4.63.0
typing_extensions==4.1.1

Description

I tried to encode and decode the image secret message, however, it failed to decode the messages, and returned:

ERROR: invalid literal for int() with base 2: 'TrueFalseTrueTrueTrueTrueTrueTrue'

What I Did

Firstly I ran:

steganogan encode --cpu --verbose --output enc.jpeg orig.jpg "123123"

The result is good, the shell responded:

Using CPU device
Encoding completed.

And then I ran:

steganogan decode --cpu --verbose enc.jpeg

The result is failed, the shell responded:

Using CPU device
ERROR: invalid literal for int() with base 2: 'TrueFalseTrueTrueTrueTrueTrueTrue'

And additional, there are some warning messages during these two runs:

/usr/local/lib/python3.7/site-packages/torch/serialization.py:671: SourceChangeWarning: source code of class 'torch.nn.modules.container.Sequential' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
/usr/local/lib/python3.7/site-packages/torch/serialization.py:671: SourceChangeWarning: source code of class 'torch.nn.modules.conv.Conv2d' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
/usr/local/lib/python3.7/site-packages/torch/serialization.py:671: SourceChangeWarning: source code of class 'torch.nn.modules.activation.LeakyReLU' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
/usr/local/lib/python3.7/site-packages/torch/serialization.py:671: SourceChangeWarning: source code of class 'torch.nn.modules.batchnorm.BatchNorm2d' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
/usr/local/lib/python3.7/site-packages/torch/serialization.py:671: SourceChangeWarning: source code of class 'steganogan.decoders.DenseDecoder' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
/usr/local/lib/python3.7/site-packages/torch/serialization.py:671: SourceChangeWarning: source code of class 'steganogan.critics.BasicCritic' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
@nekomeowww
Copy link
Author

I initially tried this python tool on my macOS with pip3 install steganogan, and encountered the same issue: ERROR: invalid literal for int() with base 2.

Then I was wondering if my envirnoment is not capable for this, I tried 0.1.3 with the same image as Docker image python:3.7-bulleye on Docker Desktop of macOS, there is no warning messages during the execution, however, I got an error with:

Using CPU device
ERROR: Failed to find message.

I follow the thread #65 with comment #65 (comment), the person said he tried a 0.1.0 version of steganogan, all the issues gone and disappeared, so I went to try version 0.1.0.

And again, I failed to compile one of the dependencies scikit-learn with following errors:

ERROR: Failed building wheel for scikit-learn
  Running setup.py clean for scikit-learn
  Running command /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vwef8q0e/scikit-learn_f13f6ce501ec42b8a9376648ead182ca/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vwef8q0e/scikit-learn_f13f6ce501ec42b8a9376648ead182ca/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all

I've tried 0.1.1, same as version 0.1.0.

Is there any helpful documentations or build examples?
I can't get any of those working.

@leferrad
Copy link

Same error here. Any updates about the reason?

@leferrad
Copy link

This can be solved by using the current version in master branch. However, to make it work, dependencies must be upgrades. I submitted #88 to track this work.

@bbtx2024
Copy link

bbtx2024 commented Nov 9, 2024

This can be solved by using the current version in master branch. However, to make it work, dependencies must be upgrades. I submitted #88 to track this work.

does that working i meet the same situation.ERROR: invalid literal for int() with base 2: 'TrueFalseTrueTrueTrueTrueTrueTrue'

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

3 participants