BlendingToolKit
BlendingToolKit copied to clipboard
Add tensorflow utility functions to efficiently feed DL tools
Images can be generated on the fly and cached using the tf.dataset API, this will be useful for feeding Deep Learning or other TensorFlow-based algorithms.
Here is an example of how to do that with GalSim: https://gist.github.com/EiffL/f7d06252b90581d3b00d01ea466257e6
We would like to be able to provide such tools for the user interface
This sounds like a good idea, what do you think @sowmyakth ?
I was thinking that good places to start would be generate
in measure.py
and in draw_blends.py
.
Thinking about this some more, I realized it might be useful to add this feature but let it be optional as to not enforce tensorflow
or pytorch
as a requirement to use BTK although I'm open to suggestions. So we would have an option for the user to work exclusively in numpy
and another option to provide a pytorch
dataset for instance.
Having an option to provide e.g. a pytorch
dataset would lower the barrier users that are training/testing ML algorithms to use BTK.
Feel like the generators can be very easily be turned into a pytorch dataset by user so not a priority at the moment.