ilastik / hytra

Python module for multi HYpotheses TRAcking
https://github.com/ilastik/hytra
MIT License
2 stars 7 forks source link

no division features #16

Closed ilastikdev closed 7 years ago

ilastikdev commented 7 years ago

of a parent object of a division (children's life time is 1 time frame - if this is increased to 2, code works)

(ilastik-devel) jales@seagul:~/software/miniconda/envs/ilastik-devel/ilastik-meta/ilastik$ ./ilastik.py
Starting ilastik from "/home/jales/software/miniconda/envs/ilastik-devel".
[====================] 100%
[====================] 100%
[====================] 100%
************************
Settings are:
    StatesShareWeights: true
    AllowPartialMergerAppearance: false
    AllowLengthOneTracks: false
    RequireSeparateChildrenOfDivision: true
    NonNegativeWeightsOnly: false
    OptimizerEpGap: 0.005
    OptimizerVerbose: true
    OptimizerNumThreads: 1
************************
    contains 6 segmentation hypotheses
    contains 8 linking hypotheses
Initializing opengm model...
Model has 60 indicator variables
    contains 8 linking annotations
    contains 6 detection annotations
    contains 2 division annotations
ERROR 2016-12-19 13:02:44,231 excepthooks 429 139810788579136 Unhandled exception in thread: 'MainThread'
ERROR 2016-12-19 13:02:44,231 excepthooks 429 139810788579136 Traceback (most recent call last):
  File "/home/jales/software/miniconda/envs/ilastik-devel/ilastik-meta/ilastik/ilastik/applets/tracking/structured/structuredTrackingGui.py", line 366, in _onRunStructuredLearningButtonPressed
    withBatchProcessing)
  File "/home/jales/software/miniconda/envs/ilastik-devel/ilastik-meta/ilastik/ilastik/applets/tracking/structured/opStructuredTracking.py", line 340, in _runStructuredLearning
    mht.trainWithWeightInitialization(model,gt, initialWeights)
RuntimeError: Trying to set division of 12 active but the variable had no division features!

object 12 (in question) does have division features:

 {'appearanceFeatures': [[0.0], [1.0]],
                             'disappearanceFeatures': [[0.0], [1.0]],
                             'divisionFeatures': [[2.0402208652063365],
                                                  [0.1392620618526208]],
                             'features': [[1.2039727645895069],
                                          [0.35667496096863105]],
                             'id': 12,
                             'timestep': [5, 5]}
chaubold commented 7 years ago

After investigating what is going on in the model, it becomes obvious that this is not a problem of hytra. Here's an excerpt from the hypotheses graph in the test project for the crop from time 0 to 6:

 'traxelToUniqueId': {'3': {'1': 6, '2': 7},
                      '4': {'1': 8, '2': 9},
                      '5': {'1': 11, '2': 12}}}

So the division is ignored because there is not even any possible child in the next frame. It looks like even though one can annotate things up to frame 6 in the training in ilastik, annotations are only inserted up to frame 5. (The graph gets pruned to annotated nodes only.) @ilastikdev: This needs to be fixed in ilastik/hytra_learning!