code: def main_canonical_360(opt):
      scene = neuman_helper.NeuManReader.read_scene(
          opt.scene_dir,
          tgt_size=opt.render_size,
          normalize=opt.normalize,
          bkg_range_scale=opt.bkg_range_scale,
          human_range_scale=opt.human_range_scale,
      )
      if opt.geo_threshold < 0:
          can_bones = []
          bones = []
          for i in range(len(scene.captures)):
              bones.append(
                  np.linalg.norm(
                      scene.smpls[i]["joints_3d"][3]
                      - scene.smpls[i]["joints_3d"][0]
                  )
              )
              can_bones.append(
                  np.linalg.norm(
                      scene.smpls[i]["static_joints_3d"][3]
                      - scene.smpls[i]["static_joints_3d"][0]
                  )
              )
          opt.geo_threshold = np.mean(bones)
      net = human_nerf.HumanNeRF(opt)
      weights = torch.load(opt.weights_path, map_location="cpu")
      utils.safe_load_weights(net, weights["hybrid_model_state_dict"])
  
      center, up = utils.smpl_verts_to_center_and_up(
          scene.static_vert[0]
      )
      render_poses = render_utils.default_360_path(
          center, up, CANONICAL_CAMERA_DIST, opt.trajectory_resolution
      )
  
      for i, rp in enumerate(render_poses):
          can_cap = ResizedPinholeCapture(
              PinholeCamera(
                  scene.captures[0].pinhole_cam.width,
                  scene.captures[0].pinhole_cam.height,
                  CANONICAL_ZOOM_FACTOR
                  * scene.captures[0].pinhole_cam.width,
                  CANONICAL_ZOOM_FACTOR
                  * scene.captures[0].pinhole_cam.width,
                  scene.captures[0].pinhole_cam.width / 2.0,
                  scene.captures[0].pinhole_cam.height / 2.0,
              ),
              rp,
              tgt_size=scene.captures[0].pinhole_cam.shape,
          )
          out = render_utils.render_smpl_nerf(
              net,
              can_cap,
              scene.static_vert[0],
              scene.faces,
              Ts=None,
              rays_per_batch=opt.rays_per_batch,
              samples_per_ray=opt.samples_per_ray,
              render_can=True,
              return_mask=False,
              return_depth=False,
              interval_comp=opt.geo_threshold / np.mean(can_bones),
          )
          save_path = os.path.join(
              "./demo",
              f"canonical_360/{os.path.basename(opt.scene_dir)}",
              f"out_{str(i).zfill(4)}.png",
          )
          if not os.path.isdir(os.path.dirname(save_path)):
              os.makedirs(os.path.dirname(save_path))
          imageio.imsave(save_path, out)
          print(f"image saved: {save_path}")
  
file_path: ml-neuman/render_360.py
imports: import os
  import argparse
  import imageio
  import torch
  import numpy
  from cameras.captures import ResizedPinholeCapture
  from cameras.pinhole_camera import PinholeCamera
  from models import human_nerf
  from utils import render_utils, utils
  from data_io import neuman_helper
  from options import options
  from utils.constant import CANONICAL_ZOOM_FACTOR, CANONICAL_CAMERA_DIST
label_desc: Use image node_id 1 for calling a global function with example usage: main_canonical_360(opt) without return types