kristinbranson / APT

Animal Part Tracker
GNU General Public License v3.0
72 stars 14 forks source link

exporting labels: include movie number #310

Closed arobie closed 4 years ago

arobie commented 4 years ago

is it possible to also include movie number in export table? its hard to interact with lbl file without its frame of reference. for example making outlier list from labels. but please, in addition to name. its also hard to interact with movie outside of project without the movie name. so asking to have it both ways of course :)

allenleetc commented 4 years ago

One point with movie indices is that they can change. For instance if you add, remove, or re-order movies. So relying on movie indices in an exported table against a working project is a little risky in the long term.

For any newer users these commands give you lists of the movies in a project:

lObj.movieFilesAllFull
lObj.movieFilesAllGTFull
arobie commented 4 years ago

Totally hear you on the numbers getting stale. So the two places I run into using movie num to interact with a project are: tracking with json method movie, frm, target triplets and loading a list of movie, frm. tarrgets to review using: lObj.suspSetComputeFcn(@outlierComputeAR3_touchinglbls); lObj.suspComputeUI

Does it make sense to change these to inputting movie names? Or I can just keep using lObj.moviesFiles to match movie name to movie num if that's the best option. I guess I wasn't even being that smart about it since, was just doing unique stable on the movie names in the label table :) But I did do a quick check that the list matched the movies in the project.

allenleetc commented 4 years ago

I think APT probably does accept moviepaths in addition to movie indices in some places. It's reasonable to extend this, but in general this is probably low priority since it should be quick to convert (see below). (Side note isn't the JSON tracking method already requiring you to specify the set of movie fullpaths under consideration?)

This should work to convert back to project movie indices unless there is a cross-platform or filesystem issue?

% all(tf) should be true; movs are the indices you seek
[tf,movs] = ismember(yourMoviePaths,lObj.movieFilesAllFull);