license import { ImageSize , Keypoint } from './interfaces/common_interfaces' ; export function keypointsToNormalizedKeypoints ( keypoints , imageSize ) { return keypoints . map ( keypoint => { const normalizedKeypoint = { ... keypoint , x : keypoint . x / imageSize . width , y : keypoint . y / imageSize . height } ; if ( keypoint . z != null ) { keypoint . z = keypoint . z / imageSize . width ; } return normalizedKeypoint ; } ) ; }