-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
143 add autoencoders #334
base: master
Are you sure you want to change the base?
143 add autoencoders #334
Conversation
Replaced nonexisting dataset variable from earlier test with an existing one.
…me functionalities into utils
…ted funcs for array and df inputs. Extended array version
@rajuranpe , could you help us by reviewing the new autoencoder implementation? It should do what your original implementation was doing, I just tried to refactor it to fit to the toolkit better. You can find the new implementation in
I have included some "additional" stuff in When the implementation is about ready, I will add some unit tests. |
@msmiyels , could you also help by reviewing this at some point? Especially since I've now touched and modified code by @rajuranpe , I don't want to merge this tool before we are sure it's correct and aligned with the toolkit |
Ahoi, @nmaarnio, I'll start the EIS review and CLI stuff this week. Can also have a look into the autoencoder, however, I do not have detailed experience with it. Would also set this to the lowest priority compared with the other open tasks, if that's okay |
Something to consider if you are venturing into neural network space:- If this is aimed at qgis users as a general demographic - so lots of windows use. Generic requirements install of tensorflow example will work - but it will get you cpu only tensorflow unless you specifically design it otherwise. |
@RichardScottOZ Ya, we know that. The toolkit/plugin is designed in a way everyone can use (and install) it with ease (more or less 😉) . Things like GPU support 🚀 were not considered 🛑 since they make the whole thing way more complicated, especially the installation. You may know that the GPU stuff is strongly dependend on gpu, system/architecture, drivers and software versioning. The NN-related functions should work quite well on CPU-only, too. I'm not at 100% sure about that for autoencoders, but those are - at least currently - not the typical method used in MPM and if added to the toolkit, more an "experimental" kind of thing. Regarding the "common" MPM-related, NN-based methods like ANN, we do not expect to have a major disadvantage by not using the GPU. Of course, will be slower, but still reasonable in terms of computing times for this purpose. |
On use of autoencoders - here's a pretty typical example I used for something a few years ago:- https://github.com/RichardScottOZ/hyperspectral-autoencoders adapted to look at minerals of course, not bricks and asphlat |
Sorry, I didn't notice this.
These two are the same things, I just seem to have made them a bit different for the U-net and non-U-net.
As these Autoencoders are often trained on images (usually clipped from larger images), I think 32 or 64 batch size is better, to make sure it can be run on less powerful computers.
These should be parametrized, yes. Maybe use the currently defined ones as the default values.
Usually regularization is beneficial to prevent overfitting, here it's done with L2 and dropout, which can be controlled by the user. L2 regularization penalizes the square values of the weights, helping to keep them small, while dropout randomly sets a fraction of input units to zero during training, which helps in making the model robust to noise and variations in input data. I think generally the results do improve when using those two, as they add noise to the data, enforcing it to work better with limited resources and generalize to not just the training data. L2 regularization can be parameterized to be replaced with L1 regularization as well. The values that dropout and L2 get were already parameterized, but should have a default value.
The modality is the number of bands, i.e. one can get it from the input data (size of the third axis in images, image.shape[2]), so as an exaple with RGB images of shape [512, 512, 3] you would get 3, but here we use bands.
The names seem ok. Autoencoders are unsupervised learning, so quite different from models like MLP but more like clustering i.e. autoencoders during training don't receive ground truth labels but instead only the raw data,
It is true that MLP wants different kind of data, since autoencoder is unsupervised learning i.e. it does not receive ground truth labels but instead only the raw data, i.e. it works like clustering and a trained model can then be used with other |
Thanks for the comments and guidance @rajuranpe ! No problem with the delay, it happens. |
No description provided.