User Tools

Site Tools


janni_tutorial

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
janni_tutorial [2019/07/10 13:29]
twagner [Training a model for your data]
janni_tutorial [2019/09/12 10:29]
twagner [Training a model for your data]
Line 27: Line 27:
         "learning_rate":        1e-3,         "learning_rate":        1e-3,
         "nb_epoch":             100,         "nb_epoch":             100,
-        "saved_weights_name":   "mymodel.h5"+        "saved_weights_name":   "mymodel.h5"
-        "train_valid_thresh":   0.8, +
-        "max_valid_img_per_file": -1,+
     }     }
 } }
Line 39: Line 37:
   * **movie_dir**: Path to the directory with the movie files. If an average exists already in even_dir or odd_dir (see below), it will be skipped.   * **movie_dir**: Path to the directory with the movie files. If an average exists already in even_dir or odd_dir (see below), it will be skipped.
   * **even_dir**: For each movie in movie_dir, an average based on the //even// frames is calculated and saved in even_dir.   * **even_dir**: For each movie in movie_dir, an average based on the //even// frames is calculated and saved in even_dir.
-  * **odd_dir**: For each movie in movie_dir, an average based on the //odd// frames is calculated and saved in even_dir.+  * **odd_dir**: For each movie in movie_dir, an average based on the //odd// frames is calculated and saved in odd_dir.
   * **batch_size**: How many patches are in one mini-batch. If you have memory problems (e.g with cards < 8GB memory), you can try to reduce this value.   * **batch_size**: How many patches are in one mini-batch. If you have memory problems (e.g with cards < 8GB memory), you can try to reduce this value.
   * **learning_rate**: Learning rate, should not be changed.   * **learning_rate**: Learning rate, should not be changed.
   * **nb_epoch**: Number of epochs to train. More epochs seems to only slightly improve the results.   * **nb_epoch**: Number of epochs to train. More epochs seems to only slightly improve the results.
   * **saved_weights_name**: Filename of your model.   * **saved_weights_name**: Filename of your model.
-  * **train_valid_thresh**: Fraction of images that are used for training from each stack file. The remaining images are used for validation. 
-  * **max_valid_img_per_file**: Maximum number of validation images per stack file that should be used. 
 In principle you only have to adapt the paths. The other could keep as they are. In principle you only have to adapt the paths. The other could keep as they are.
-We typically use at least 30 movies to train the model. Less might also work, more work often much better. +We typically use at least 30 movies (unaligned) to train the model. Less might also work, more work often much better. 
  
 To run the training on gpu 0: To run the training on gpu 0:
janni_tutorial.txt · Last modified: 2020/09/24 14:46 by twagner