Giter VIP home page Giter VIP logo

Comments (6)

tancik avatar tancik commented on June 15, 2024 1

Hmmm, interesting, so far I have tested the SteagaStamp install procedure on 3 machines and haven't run into this issue. Your encoded message is just "Hello", correct?

The BCH library being used is the following - https://github.com/jkent/python-bchlib
Can you verify that you are able to run their example script without any issues? Can you also verify that this variable is set to a list of 100 integers that are either 0 or 1.

For a little background, BCH is used to for error correcting and is not core to the method. If you want to skip using BCH, you can modify the encoder here, and set the secret to be a 100 element list of 0/1 ints. During decoding, this will associate the the decoded list of ints.

from stegastamp.

tancik avatar tancik commented on June 15, 2024

What exact commands are you running to encode and decode the data?
Have you modified the code at all? Did you change BCH_POLYNOMIAL or BCH_BITS?

from stegastamp.

yfeiwu avatar yfeiwu commented on June 15, 2024

I use the same command as README. The encode command outputs the encoded image and residual one successfully.
But when run decode, it comes to this problem. I don’t modify the code or the BCH numbers at all.

from stegastamp.

yfeiwu avatar yfeiwu commented on June 15, 2024

Yes, I just encoded the string Hello.
The BCHlib seems to be correct when I ran the example.

The secret variable in both encode and decode is correct as you say, and packet_binary ouputs the 96 numbers into string.
When checking the encode outputs, I found the problem.
The packet value is a format like
<generator object <genexpr> at 0x7f09b0350550>
So data outputs <generator object <genexpr> at 0x7f09b035 and ecc outputs 0550>.

When I test on another machine with Python3 and tf 1.19, the decode works.

from stegastamp.

tancik avatar tancik commented on June 15, 2024

Ahh, this may be a python 2 vs 3 issue. I've been testing everything with python 3. Let me know if that fixes things, if so I will update the readme.

from stegastamp.

tancik avatar tancik commented on June 15, 2024

I was able to replicate your error with python 2, so it indeed a py2/3 compatibility error. Adding python 2 support is not a priority, I would suggest using python 3 for the time being.

The readme has been updated to specify the python3 requirement.

from stegastamp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.