code: def IUV2FBC(self, I_point, U_point, V_point):
      P = [U_point, V_point, 0]
      FaceIndicesNow = np.where(self.FaceIndices == I_point)
      FacesNow = self.FacesDensePose[FaceIndicesNow]
      #
      P_0 = np.vstack(
          (
              self.U_norm[FacesNow][:, 0],
              self.V_norm[FacesNow][:, 0],
              np.zeros(self.U_norm[FacesNow][:, 0].shape),
          )
      ).transpose()
      P_1 = np.vstack(
          (
              self.U_norm[FacesNow][:, 1],
              self.V_norm[FacesNow][:, 1],
              np.zeros(self.U_norm[FacesNow][:, 1].shape),
          )
      ).transpose()
      P_2 = np.vstack(
          (
              self.U_norm[FacesNow][:, 2],
              self.V_norm[FacesNow][:, 2],
              np.zeros(self.U_norm[FacesNow][:, 2].shape),
          )
      ).transpose()
      #
  
      for i, [P0, P1, P2] in enumerate(zip(P_0, P_1, P_2)):
          if self.barycentric_coordinates_exists(P0, P1, P2, P):
              [bc1, bc2, bc3] = self.barycentric_coordinates(
                  P0, P1, P2, P
              )
              return (FaceIndicesNow[0][i], bc1, bc2, bc3)
      #
      # If the found UV is not inside any faces, select the vertex that is closest!
      #
      D1 = scipy.spatial.distance.cdist(
          np.array([U_point, V_point])[np.newaxis, :], P_0[:, 0:2]
      ).squeeze()
      D2 = scipy.spatial.distance.cdist(
          np.array([U_point, V_point])[np.newaxis, :], P_1[:, 0:2]
      ).squeeze()
      D3 = scipy.spatial.distance.cdist(
          np.array([U_point, V_point])[np.newaxis, :], P_2[:, 0:2]
      ).squeeze()
      #
      minD1 = D1.min()
      minD2 = D2.min()
      minD3 = D3.min()
      #
      if (minD1 < minD2) & (minD1 < minD3):
          return (FaceIndicesNow[0][np.argmin(D1)], 1.0, 0.0, 0.0)
      elif (minD2 < minD1) & (minD2 < minD3):
          return (FaceIndicesNow[0][np.argmin(D2)], 0.0, 1.0, 0.0)
      else:
          return (FaceIndicesNow[0][np.argmin(D3)], 0.0, 0.0, 1.0)
  
file_path: dense-pose/detectron/utils/densepose_methods.py
imports: import numpy
  import copy
  import cv2
  from scipy.io import loadmat
  import scipy.spatial.distance
  import os
label_desc: Use image node_id 5 for calling the DensePoseMethods obj's underlying member method code with example usage: obj.IUV2FBC(I_point, U_point, V_point) and returns: FaceIndicesNow,  int,  int,  int, FaceIndicesNow,  bc1,  bc2,  bc3, FaceIndicesNow,  int,  int,  int, FaceIndicesNow,  int,  int,  int