ethan-tseng / neural_nano-optics Goto Github PK
View Code? Open in Web Editor NEWRepository for "Neural Nano-Optics for High-quality Thin Lens Imaging"
License: Boost Software License 1.0
Repository for "Neural Nano-Optics for High-quality Thin Lens Imaging"
License: Boost Software License 1.0
Hello, thank you very much for the code, but I found some problems while using it.
At that time when I was training with the source code and data, I found that the result of the generator was all white.
Can you tell me what could be the reason for this?
Since thess is no description about the best loss weighting coefficients {λ1, λperc, λgrad} used in training, I wonder whether it is the value set in the ”run_train.sh“ that λ1=1.0, λperc=0.1 and λgrad=0.0.
From your published paper, I can see the lens parameters that you've trained are as follows:
phase_initial = np.array([-0.3494864 , -0.00324192, -1., -1.,-1., -1., -1., -1.], dtype=np.float32)
Plugging these parameters into the phase distribution polynomial yields the phase distribution. However, I'm wondering how to map this phase distribution to the physical structure of the lens. Could you provide some guidance and references on how to proceed with this mapping?
Hi teams, thanks for sharing your brilliant work!
I have some problems with hyperparameters and hope you can save my day.
Thanks!!
I'm new to the field of Fourier Optics. I couldn't understand this function since I can't match it to any kind of diffraction. Can anyone have some formulas here to explain it ?
def make_propagator(params):
batchSize = params['batchSize']
pixelsX = params['pixelsX']
pixelsY = params['pixelsY']
upsample = params['upsample']
# Propagator definition.
k = 2 * np.pi / params['lam0'][:, 0, 0]
k = k[:, np.newaxis, np.newaxis]
samp = params['upsample'] * pixelsX
k = tf.tile(k, multiples = (1, 2 * samp - 1, 2 * samp - 1))
k = tf.cast(k, dtype = tf.complex64)
k_xlist_pos = 2 * np.pi * np.linspace(0, 1 / (2 * params['Lx'] / params['upsample']), samp)
front = k_xlist_pos[-(samp - 1):]
front = -front[::-1]
k_xlist = np.hstack((front, k_xlist_pos))
k_x = np.kron(k_xlist, np.ones((2 * samp - 1, 1)))
k_x = k_x[np.newaxis, :, :]
k_y = np.transpose(k_x, axes = [0, 2, 1])
k_x = tf.convert_to_tensor(k_x, dtype = tf.complex64)
k_x = tf.tile(k_x, multiples = (batchSize, 1, 1))
k_y = tf.convert_to_tensor(k_y, dtype = tf.complex64)
k_y = tf.tile(k_y, multiples = (batchSize, 1, 1))
k_z_arg = tf.square(k) - (tf.square(k_x) + tf.square(k_y))
k_z = tf.sqrt(k_z_arg)
# Find shift amount
theta = params['theta'][:, 0, 0]
theta = theta[:, np.newaxis, np.newaxis]
y0 = np.tan(theta) * params['f']
y0 = tf.tile(y0, multiples = (1, 2 * samp - 1, 2 * samp - 1))
y0 = tf.cast(y0, dtype = tf.complex64)
phi = params['phi'][:, 0, 0]
phi = phi[:, np.newaxis, np.newaxis]
x0 = np.tan(phi) * params['f']
x0 = tf.tile(x0, multiples = (1, 2 * samp - 1, 2 * samp - 1))
x0 = tf.cast(x0, dtype = tf.complex64)
propagator_arg = 1j * (k_z * params['f'] + k_x * x0 + k_y * y0)
propagator = tf.exp(propagator_arg)
return propagator
Thanks to the authors for sharing such fantastic work!
嗨~ I am studying your article, but for a beginner, there are too many things I don't understand. I want to ask you the details of the specific mapping between the phase function and the scatterer structure.Thank you very much.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.