gffrct / joint-lens-design

Official code repository for the paper: "The Differentiable Lens: Compound Lens Search over Glass Surfaces and Materials for Object Detection"
MIT License
20 stars 12 forks source link

What is the "main.py" for this repo? #1

Open zhaoguangyuan123 opened 1 year ago

zhaoguangyuan123 commented 1 year ago

Hi Geoffroi,

Thanks for open-sourcing this code. I am reproducing the results in your paper. However, I find this repo does not contain an entrance, like a main fun for the ray-tracing.

The "simulate aberrations.py" does not use the other ray-tracing functions. Do I need to write my own main function to utilize the modules you present in the repo?

Thank you Guangyuan

gffrct commented 1 year ago

Hi Guangyuan,

Thank you for your interest. In the simulate_aberrations.py script, the ray-tracing operations take place when the RaytracedOptics model is called (OpticsSimulator.call -> RaytracedOptics.sample_optics_model -> RaytracedOptics.do_ray_tracing).

If you want to use ray tracing for a different purpose than the image simulation model proposed in this code, you will need to make some adjustments.

Hope that helps! Geoffroi

zhaoguangyuan123 commented 1 year ago

Hi Guangyuan,

Thank you for your interest. In the simulate_aberrations.py script, the ray-tracing operations take place when the RaytracedOptics model is called (OpticsSimulator.call -> RaytracedOptics.sample_optics_model -> RaytracedOptics.do_ray_tracing).

If you want to use ray tracing for a different purpose than the image simulation model proposed in this code, you will need to make some adjustments.

Hope that helps! Geoffroi

Great! Thanks for guiding me. That helps!

Best, Guangyuan