Support multiple regeneratable footage analyses
This commit is contained in:
parent
5bcf22e458
commit
15deaea19e
20 changed files with 333 additions and 168 deletions
|
|
@ -26,3 +26,34 @@
|
|||
(vals (get-in clip [:symbols :take :nodes]))))))
|
||||
"and the copy's instance follows its renamed symbol")
|
||||
(is (empty? (clip/problems clip)))))
|
||||
|
||||
(defn- tracked-take [analysis-id]
|
||||
{:analyses {analysis-id {:id analysis-id :detector "test" :version "1"}}
|
||||
:subjects {:face-1 {:id :face-1 :analysis analysis-id
|
||||
:source-subject :face-1 :params {}}}
|
||||
:features {:face-1/mouth {:id :face-1/mouth :subject :face-1
|
||||
:symbol :face-1 :area :mouth :nodes [:mouth] :params {}}}
|
||||
:groups {}
|
||||
:symbols {:main {:id :main :fps 30 :frames 10
|
||||
:nodes {:face-1 {:id :face-1 :kind :instance :z "a1"
|
||||
:source {:symbol :face-1}}}}
|
||||
:face-1 {:id :face-1 :fps 30 :frames 10
|
||||
:nodes {:head {:id :head :kind :group :z "a1"
|
||||
:measured {[:xform :pos]
|
||||
{:animated? false :value [0 0]}}}
|
||||
:mouth {:id :mouth :kind :poly :z "a2"}}}}})
|
||||
|
||||
(deftest every-import-is-tracked-under-its-unique-symbol-scope
|
||||
(let [first (bring/take (clip/blank) (tracked-take "analysis-a")
|
||||
"close up" "footage-a" [0 10])
|
||||
second (bring/take (:clip first) (tracked-take "analysis-b")
|
||||
"close up" "footage-b" [0 10])
|
||||
c (:clip second)]
|
||||
(is (= #{:close-up.face-1 :close-up-2.face-1} (set (keys (:subjects c)))))
|
||||
(is (= #{"analysis-a" "analysis-b"} (set (keys (:analyses c)))))
|
||||
(is (= "analysis-a" (get-in c [:subjects :close-up.face-1 :analysis])))
|
||||
(is (= "analysis-b" (get-in c [:subjects :close-up-2.face-1 :analysis])))
|
||||
(is (= :face-1 (get-in c [:subjects :close-up-2.face-1 :source-subject])))
|
||||
(is (= #{:close-up.face-1/mouth :close-up-2.face-1/mouth}
|
||||
(set (keys (:features c)))))
|
||||
(is (empty? (clip/problems c)))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue