@@ -324,18 +324,18 @@ export class BlazePoseTfjsDetector extends BasePoseDetector {
324324 // Output[3]: This tensor (shape: [1, 195]) represents 39 5-d keypoints.
325325 // The first 33 refer to the keypoints. The final 6 key points refer to
326326 // the alignment points from the detector model and the hands.)
327- // Output [0 ]: This tensor (shape: [1, 1]) represents the confidence
327+ // Output [4 ]: This tensor (shape: [1, 1]) represents the confidence
328328 // score.
329- // Output [2 ]: This tensor (shape: [1, 64, 64, 39]) represents heatmap for
329+ // Output [1 ]: This tensor (shape: [1, 64, 64, 39]) represents heatmap for
330330 // the 39 landmarks.
331331 // Lite model:
332- // Output[1 ]: This tensor (shape: [1, 195]) represents 39 5-d keypoints.
333- // Output[2 ]: This tensor (shape: [1, 1]) represents the confidence score.
334- // Output[4 ]: This tensor (shape: [1, 64, 64, 39]) represents heatmap for
332+ // Output[4 ]: This tensor (shape: [1, 195]) represents 39 5-d keypoints.
333+ // Output[3 ]: This tensor (shape: [1, 1]) represents the confidence score.
334+ // Output[1 ]: This tensor (shape: [1, 64, 64, 39]) represents heatmap for
335335 // the 39 landmarks.
336336 // Heavy model:
337337 // Output[3]: This tensor (shape: [1, 195]) represents 39 5-d keypoints.
338- // Output[2 ]: This tensor (shape: [1, 1]) represents the confidence score.
338+ // Output[1 ]: This tensor (shape: [1, 1]) represents the confidence score.
339339 // Output[4]: This tensor (shape: [1, 64, 64, 39]) represents heatmap for
340340 // the 39 landmarks.
341341 const landmarkResult =
@@ -345,18 +345,18 @@ export class BlazePoseTfjsDetector extends BasePoseDetector {
345345
346346 switch ( this . modelType ) {
347347 case 'lite' :
348- landmarkTensor = landmarkResult [ 1 ] as tf . Tensor2D ;
349- poseFlagTensor = landmarkResult [ 2 ] as tf . Tensor2D ;
350- heatmapTensor = landmarkResult [ 4 ] as tf . Tensor4D ;
348+ landmarkTensor = landmarkResult [ 3 ] as tf . Tensor2D ;
349+ poseFlagTensor = landmarkResult [ 4 ] as tf . Tensor2D ;
350+ heatmapTensor = landmarkResult [ 1 ] as tf . Tensor4D ;
351351 break ;
352352 case 'full' :
353- landmarkTensor = landmarkResult [ 3 ] as tf . Tensor2D ;
354- poseFlagTensor = landmarkResult [ 0 ] as tf . Tensor2D ;
355- heatmapTensor = landmarkResult [ 2 ] as tf . Tensor4D ;
353+ landmarkTensor = landmarkResult [ 4 ] as tf . Tensor2D ;
354+ poseFlagTensor = landmarkResult [ 3 ] as tf . Tensor2D ;
355+ heatmapTensor = landmarkResult [ 1 ] as tf . Tensor4D ;
356356 break ;
357357 case 'heavy' :
358358 landmarkTensor = landmarkResult [ 3 ] as tf . Tensor2D ;
359- poseFlagTensor = landmarkResult [ 2 ] as tf . Tensor2D ;
359+ poseFlagTensor = landmarkResult [ 1 ] as tf . Tensor2D ;
360360 heatmapTensor = landmarkResult [ 4 ] as tf . Tensor4D ;
361361 break ;
362362 default :
0 commit comments