diff --git a/boundingbox/static/boundingbox/boundingbox.js b/boundingbox/static/boundingbox/boundingbox.js index 4b6cab4..cea625a 100644 --- a/boundingbox/static/boundingbox/boundingbox.js +++ b/boundingbox/static/boundingbox/boundingbox.js @@ -71,6 +71,9 @@ function setupSegmentation() { return; g_paint = false; g_annotationHasChanged = true; + if(g_sequenceLength === 0){ + addKeyFrame(g_currentFrameNr); + } addBox(g_currentFrameNr, g_BBx, g_BBy, g_BBx2, g_BBy2, g_currentLabel); console.log('finished BB on ' + g_BBx + ' ' + g_BBy); }); @@ -78,6 +81,9 @@ function setupSegmentation() { $('#canvas').mouseleave(function(e){ if(g_paint) { g_annotationHasChanged = true; + if(g_sequenceLength === 0){ + addKeyFrame(g_currentFrameNr); + } addBox(g_currentFrameNr, g_BBx, g_BBy, g_BBx2, g_BBy2, g_currentLabel); redrawSequence(); g_paint = false;