Improvements to the logic triggered by selecting a results file in the multi worm tracker GUI.
Current behaviour:
if a masked video is dropped in the video field, the corresponding results file is found, and masked videos + results are opened
if a skeletons file is dropped in the skeletons field, and there is no open masked video, nothing happens.
if a featuresN file is dropped in the skeletons field, and there is no open masked video, Tierpsy crashes.
if a results file is dropped in the skeletons field, and there is already an open masked video, only the newly dropped results file is updated.
Pro: useful to compare skeletons.hdf5 and featuresN.hdf5, or to compare different versions of the featuresN.hdf5 (e.g. if you’re trying different skeletonisation parameters, of testing a NN).
Con: one can load a results file that does not match the masked video
Proposed improvements:
if a masked video is dropped in the video field, the corresponding results file is found, and masked videos + results are opened (unchanged: reloading video always reloads results as well)
if any results file (skeletons or features) is dropped in the skeletons field, and there is no open masked video, try to find the corresponding masked video, open both
if a results file is dropped in the skeletons field, and there is already an open masked video:
if the results file matches the masked video (i.e. if their filenames are the same apart from MaskedVideos <--> Results, and .hdf5 <--> _featuresN.hdf5 or _skeletons.hdf5) then just load the new results file (use case: compare skeletons and featuresN file)
if the results file does not match the masked video, pop up a dialogue window and give the user three options:
open the results anyway (could lead to video/results mismatch, but good if you want to e.g. compare different versions of the featuresN)
try to find a matching masked video, and then open the newly found masked video and the results file
Improvements to the logic triggered by selecting a results file in the multi worm tracker GUI.
Current behaviour:
Proposed improvements:
MaskedVideos
<-->Results
, and.hdf5
<-->_featuresN.hdf5
or_skeletons.hdf5
) then just load the new results file (use case: compare skeletons and featuresN file)