Closed paulpeyret-biophonia closed 1 month ago
Hi, we’ve been planning to do this and I actually just started a prototype yesterday :) The challenge/limitstion is that it won’t be able to handle any custom functions defined by the users code. But it will easily save and reload the built in preprocessing functions.
initial implementation in this commit https://github.com/kitzeslab/opensoundscape/commit/b729842cea3b2dced46dd599c0bb30b66ec572fb and it will actually support custom functions/classes as long as the user provides them in the code and decorates them so that they are "registered"
In OPSO version : 0.10.2 it seems that designing a custom preprocessing/augmentation pipeline requires either to:
SpectrogramPreprocessor
object then change the pipeline actions manually. orBasePreceprocessor
with a custom pipeline initialized at instanciation.In order to get the maximum flexibility over the actions and there parameters, Would it make sense to use a
preprocessing_config.yaml
file to create a custom preprocessing pipeline? In my mind, that could require to add aCustomPreprocessor
class to the package with a class method.from_yaml()
which would be an alternative constructor that provide multiple ways to create different instances of this class. The yaml file would contain a dictionary with each action names (in the desired order of the pipeline) and there associated set of parameters.Something similar have been done here : https://github.com/musikalkemist/praudio
I see some benefits to this:
Would it make sense? Or is there already a way through flexible Preprocessor customization (I might have missed something)?