What's the maning of this cpde?

I know the meaning of std and mean, but it seem strange here with img = img* std +mean, why this code write like this form?

First of all this is not at all the location to ask this question. All function and methods you are using are of numpy.
To answer the question I think it is doing what it seems. It is multiplying img by 0.5 and adding 0.5 to it. I think the purpose is that the data was initially standardized.

Standardization formula : z = (x-mean)/std

So by doing z*std + mean you are basically de-standardizing the data to it’s original form.

Thank u for your anser^_^