sgoldenlab / simba

SimBA (Simple Behavioral Analysis), a pipeline and GUI for developing supervised behavioral classifiers
https://simba-uw-tf-dev.readthedocs.io/
GNU General Public License v3.0
288 stars 140 forks source link

Feature: Additional models after Project Creation #19

Closed JensBlack closed 4 years ago

JensBlack commented 4 years ago

Disclaimer: This is a feature that mainly is directed at easy use and therefore is only meant as a suggestion.

I am currently trying to merge different automatic labelling approaches into one project and noticed that there is no option to add additional models after the initial project creation. This is probably connected to the consistency of the feature extraction tool, but could be easily implemented in a workaround solution (like the one i do). Describe the solution you'd like So far i saw the following necessary changes to add a model into an existing project: in the project_config file add a new line in the following sections and increase the number of targets:

[SML settings] model_dir = D:/SimBa\MovementDetector\models model_path_1 = D:/SimBa\ProjectName\models\Existing_model1.sav model_path_2 = D:/SimBa\ProjectName\models\Existing_model2.sav model_path_3 = D:/SimBa\ProjectName\models\New_model.sav no_targets = 3 target_name_1 = Existing_model1 target_name_2 = Existing_model2 target_name_3 = New_model

[threshold_settings] threshold_1 = threshold_2 = threshold_3 =

[Minimum_bout_lengths] min_bout_1 = min_bout_2 = min_bout_3 =

This addition to project_config file could be easily done via the app (i think) and would allow non advanced users to change the number of existing models without the need to create a new project.

With these changes and an external addition of extracted features to the necessary csv file i was able to create a new model and train it within the simba app.

Additional context I have not tested if the feature extraction is working with all 3 models (Old_model1, old_model2, New_Model) if there are already feature extractions for the old models. You can probably elaborate if you are overwriting the feature extracted csv file or add columns to it.

Edit: spelling

sgoldenlab commented 4 years ago

Hi @JensBlack - thanks for pointing this out: we have added a function in the [Further imports (data/video/frames] tab in the Load project menu which you can use to add further classifiers, or remove existing ones, from the project:

image

sgoldenlab commented 4 years ago

PS. The min_bout, threshold, and model path in the project_config.ini, will be updates when you set the variables for the model in the [Run machine model] tab.