samedi 12 mai 2018

How to revert shuffled array in python with default PRNG and indexes?

Here is the code for the example: https://nbviewer.jupyter.org/github/ML-Dojo/lena/blob/master/lena1.ipynb

Moving an image to an array then flattening it and shuffling with given x seed it should be easy to unshuffle it with the given seed and indexes from the shuffling process.

  1. read image IMG
  2. flatten array
  3. random.seed(x) and shuffle -> indexes
  4. random.seed(x) and unshuffle(indexes) -> IMG

However, this RESULT shows that the resulting IMG is simmilar but not 1:1 as the input image with this grain noise.

Why the unshuffling gives so much noise if it is not the RNG, only PRNG?




Aucun commentaire:

Enregistrer un commentaire