{"action":"opened","issue":{"url":"https://api.github.com/repos/biometrics/janus/issues/32","repository_url":"https://api.github.com/repos/biometrics/janus","labels_url":"https://api.github.com/repos/biometrics/janus/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/biometrics/janus/issues/32/comments","events_url":"https://api.github.com/repos/biometrics/janus/issues/32/events","html_url":"https://github.com/biometrics/janus/issues/32","id":152891410,"number":32,"title":"janus_create_template","user":{"login":"nxwhite-str","id":8779849,"avatar_url":"https://avatars.githubusercontent.com/u/8779849?v=3","gravatar_id":"","url":"https://api.github.com/users/nxwhite-str","html_url":"https://github.com/nxwhite-str","followers_url":"https://api.github.com/users/nxwhite-str/followers","following_url":"https://api.github.com/users/nxwhite-str/following{/other_user}","gists_url":"https://api.github.com/users/nxwhite-str/gists{/gist_id}","starred_url":"https://api.github.com/users/nxwhite-str/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nxwhite-str/subscriptions","organizations_url":"https://api.github.com/users/nxwhite-str/orgs","repos_url":"https://api.github.com/users/nxwhite-str/repos","events_url":"https://api.github.com/users/nxwhite-str/events{/privacy}","received_events_url":"https://api.github.com/users/nxwhite-str/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-03T22:44:21Z","updated_at":"2016-05-03T22:44:21Z","closed_at":null,"body":"In the interest of keeping the API as simple as possible, it seems the second definition of janus_create_template, taking a single media object and returning collections of templates and tracks, is unnecessary.  The intent of that method seems to be to remove the ground truth association out of the processing and have the algorithm decide how many individual subjects there are in the media.  If I'm understanding that correctly, it seems the user could get that same behavior with the calls to janus_detect and the first definition of janus_create_template, and that logic seems more appropriate to implement in the test harness rather than a separate API call that each algorithm needs to implement.  This pseudo-code illustrates what I think is the requested behavior:\r\n\r\n```\r\nvector<janus_template> templates;\r\nvector<janus_track> tracks;\r\n\r\njanus_media media;\r\njanus_load_media(filename, media);\r\n\r\njanus_detect(media, min_face_size, tracks);\r\nfor (auto& track: tracks) {\r\n    // assumes janus_association no longer holds vector of tracks per issue #27\r\n    janus_association assoc = { media, track };\r\n    vector<janus_association> assocs =  { assoc };\r\n    janus_template template_;\r\n    janus_create_template(assocs, role, template_);\r\n    templates.push_back(template_);\r\n}\r\n\r\n```\r\n\r\nFinally, the second definition of \"janus_create_template\" in fact creates a collection of templates, and it would be more precise to call this \"janus_create_all_templates\".  One may argue that creating templates from media directly rather than janus_associations allows for some sort of within media tracking and clustering.  However, would not this improved functionality already be included in \"janus_detect\", since \"janus_detect\" has the same inputs as the second definition of \"janus_create_template\"?\r\n\r\nSo, given that it appears that second definition of \"janus_create_template\" can be decomposed into atomic API calls by the test harness, we recommend that it be removed. "}}