code: def get_Ps_from_Faces(R, T):
      Ps = []
      cam_locs = []
  
      intrinsics = np.concatenate(
          [
              [4500.0],
              [0.0],
              [512.0],
              [0.0],
              [4500.0],
              [512.0],
              [0.0],
              [0.0],
              [1.0],
          ],
          axis=0,
      )
      intrinsics = np.reshape(intrinsics, [3, 3])
  
      projection = np.concatenate(
          [
              [1.0],
              [0.0],
              [0.0],
              [0.0],
              [0.0],
              [1.0],
              [0.0],
              [0.0],
              [0.0],
              [0.0],
              [1.0],
              [0.0],
          ],
          axis=0,
      )
      projection = np.reshape(projection, [3, 4])
  
      I14 = np.concatenate([[0.0], [0.0], [0.0], [1.0]], axis=0)
      I14 = np.reshape(I14, [1, 4])
  
      for i in range(0, len(R)):
          R0 = R[i]
          T0 = T[i].reshape(3, 1)
  
          p = np.concatenate(
              [
                  np.concatenate([R[i].T, T[i].reshape(3, 1)], axis=1),
                  I14,
              ],
              axis=0,
          )
          P = intrinsics @ projection @ p
          P = P.astype(np.float64)
  
          camera_loc = -np.dot(R0, T0)
          cam_locs.append(camera_loc)
          Ps.append(P)
  
      return np.array(Ps)
  
file_path: insightface/reconstruction/PBIDR/code/preprocess/preprocess_cameras.py
imports: import numpy
  import matplotlib.image
  import matplotlib.pyplot
  import cv2
  import argparse
  from glob import glob
  import os
  import sys
  import pickle
  from scipy.spatial.transform import Rotation
  import utils.general
label_desc: Use image node_id 1 for calling a global function with example usage: get_Ps_from_Faces(R, T) and returns: np