Comments (4)
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.
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.
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.
Thank you for your reply! Now I am trying to do Images for lossless zoom.
from stegastamp.
Related Issues (20)
- Hello, author, I want to train a model with the height of 1200 and the width of 800 HOT 1
- Problem with parameter setting . HOT 4
- Error code < TypeError: join() argument must be str or bytes, not 'NoneType' > while training HOT 3
- Detecting and decoding an image
- Why StegaStamp can only encode 56bits (7 characters) with ECC? HOT 1
- Detector dataset
- Which parameter or loss is the most important for the decodability of the printed image?
- How to convert encoded_image from tensor to numpy ? HOT 2
- Problem with parameter
- according to bash scripts/base.sh EXP_NAME,Model test after training HOT 5
- How to fine tune the model?
- Is the loss of the discriminator negative?
- How could I transform my picture like what displayed in the paper?
- what does the Cos dropoff means?
- How to train the model on 256x256?
- Secret Loss is not being optimized HOT 2
- How to embed url into imgs? HOT 1
- dataset HOT 1
- Can you provide the dataset you use?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stegastamp.