Giter VIP home page Giter VIP logo

Comments (4)

 avatar commented on June 1, 2024

The size of input picture of pretrained model provided by author is 400 * 400 pixels, so if you don't modify the network structure and train separately for your picture size, just want to use the pretrained model, you need to modify your picture size. tf.image.resize_image_with_crop_or_pad or other image processing functions could be useful to resize the image

from stegastamp.

zhouzhiyang-666 avatar zhouzhiyang-666 commented on June 1, 2024

I want to make the encoded image the same as the pixels before encoding.
I changed encode_image.py separately. width and height modify to 500.
It throws the following question.
Traceback (most recent call last):
File "encode_image.py", line 94, in
main()
File "encode_image.py", line 75, in main
hidden_img, residual = sess.run([output_stegastamp, output_residual],feed_dict=feed_dict)
File "/home/abc/venvs/tensorflow/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 929, in run
run_metadata_ptr)
File "/home/abc/venvs/tensorflow/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1128, in _run
str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (1, 500, 500, 3) for Tensor 'input_hide:0', which has shape '(?, 400, 400, 3)'

from stegastamp.

 avatar commented on June 1, 2024

Only the changes of encode_image.py can't work. The structure of the pre-trained model provided by the author determines that your input CAN ONLY BE the size of 400 * 400. If you want the size of input and output to be 500*500, you need to re-train a model, which requires changing the code in models.py and train.py.

A simpler method is that you can write a function to resize picture to 400 * 400 before it is input into the model, and again resize it to 500 * 500 after output. However, since the author did not add the process of it to the analog noise, which includes the process of interpolation and down sampling. I guess the decoding accuracy after scaling will be impacted more or less.

from stegastamp.

zhouzhiyang-666 avatar zhouzhiyang-666 commented on June 1, 2024

Thank you for your reply! Now I am trying to do Images for lossless zoom.

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.