Skip to content

2. Customizing SynthDa

Meg-R edited this page Jun 24, 2025 · 1 revision

๐Ÿ”ง Customization Options

This section outlines the various customization options available across the AutoSynthDa pipeline. From adjusting model parameters and camera angles to modifying default prompts and rendering styles, these settings provide flexibility to fine-tune the behavior and output of each component to better suit your use case.

joints2smpl

๐Ÿฆพ Adjusting Joint Fitting Accuracy and Processing Time

The accuracy of how closely the joints are fitted can be adjusted using the number of iterations. Higher values lead to more accurate results but also increase the computation time. A value of 15 is recommended for a balance between speed and quality.

You can modify this using the --num_smplify_iters parameter when running the command, or by manually editing the fit_seq.py file within the joints2smpl repository.

image

SynthDa

๐Ÿง  Adjusting the Default Prompt Generation from OpenAI

When the LLM (e.g. OpenAI's ChatGPT) fails to recognize or generate a valid action from the input video, a fallback action prompt is used. This fallback is defined by the action_class variable in :

./video_processing/models.py

image

It is then injected into the system prompt when calling the LLM API: image


๐ŸŽฅ Using Other Video Formats Besides .mp4

If your video files are in formats other than .mp4 (e.g., .mov, .avi), you must update the file extension references in the pipeline scripts.

Replace all occurrences of .mp4 in process_real2synth_pipeline.py with your desired file format:

image image image

Do the same for process_real2real_pipeline.py:

image image

โš ๏ธ If these changes are not made, the pipeline may fail to detect and process your videos, as it only searches for .mp4 files by default.


๐Ÿ”— Mapping 17 Joints to 24 Joints

The model used in the StridedTransformer-Pose3D repository is trained on the Human3.6M (H36M) dataset, which contains approximately 3.6 million frames. This dataset defines 17 joints for 3D human pose estimation.

However, both SMPL and text-to-motion require 24 joints, which means a mapping between the 17-joint H36M format and the 24-joint SMPL format is necessary.

You can adjust this mapping in the following function: ./AutoDa/optimisation/optimisation_utils.py โ†’ map_h36m_to_smpl()

image

SMPL Joint Structure (Reference) defined in joints2mpl/src/config.py

image

๐Ÿ“„ You can find the official documentation of the 17 Human3.6M joints here.


๐Ÿ“ˆ Adjusting the Interpolation Between Pose Points (compute_P_opt())

The interpolation of pose points between the two sourcesโ€”whether from synthetic data or a second real videoโ€”is handled in the compute_P_opt() function.

A key parameter, alpha determines the weight of interpolation:

  • A higher alpha biases more towards the second input (synthetic or real).
  • A lower alpha gives more emphasis to the first real videoโ€™s data.

Currently, alpha is fixed at 0.5 in both the real_syn and real_real optimization scripts.
This creates a balanced contribution between the two data sources.

You can find and adjust this parameter in the respective calls to compute_P_opt() within:

  • AutoDa/optimisation/optimisation_real_synth.py
  • AutoDa/optimisation/optimisation_both_real.py

Optimisation logic is defined in compute_P_opt() within ./optimisation/optimisation_utils.py, where the real and synthetic poses are blended.

image

This optimisation function is invoked in both the real-synthetic and real-real pipelines, the alpha that controls the interpolation strength can be adjusted in here.

image


๐ŸŽž๏ธ Adjusting Number of Video Combinations for Real-to-Real (both_real_main())

The number of video pairs for real-to-real processing can exceed the number of individual uploaded videos. This is because the combinations are formed using pairwise comparisons.

The both_real_main() function accepts a parameter number_of_videos, which determines how many combinations will be generated. The number of valid pairs is based on combinatorial logic.

For example, given three videos: [video_1, video_2, video_3]

You can generate the following 3 combinations:

  • [video_1, video_2]
  • [video_2, video_3]
  • [video_1, video_3]

This logic ensures flexible scaling when testing or training across multiple real video inputs.

image


Blender (animation_pose.py in blender Folder)

Blender is used to generate the video from the .ply objects generated by the joints2smpl repository. The custom Python script, animation_pose.py, imports these .ply files, places them according to the frame they represent (e.g., 0001 for the first frame, 0002 for the second, and so on), and exports them as a video.

Further adjustments can be made directly within the animation_pose.py script to suit specific visualization or rendering needs.

๐ŸŽจ Customizing Blender Environment

The environment and visual settings in Blender can be adjusted within the scene_addition() function. This includes:

  • ๐Ÿ‘ค Character Color (line 207)
  • ๐Ÿชต Floor Color (line 222)
  • ๐ŸŒซ๏ธ Background Color (line 230)

You can modify these RGBA values to customize the appearance of the rendered animation.

image


๐ŸŽฅ Adjusting Camera Angles in Blender (angleInput.txt)

You can customize the number and type of angles rendered in Blender by editing the angleInput.txt file located in the Blender folder.

The available camera angles you can specify are:

  • front
  • back
  • left
  • front-left
  • front-right
  • upper-left
  • upper-right

These values are processed by the set_camera_view() function during rendering to set up the appropriate camera perspectives.

image


โš™๏ธ Additional Camera Parameters

The following parameters can be adjusted to fine-tune the camera setup:

  • LeftRight-adjust: Modifies the camera's placement along the X-axis
  • closeness-adjust: Controls how close the camera is to the subject
  • height-adjust: Adjusts the camera's height along the Z-axis
  • camera-angle: Changes the tilt angle of the camera

These variables are also handled within the set_camera_view() function to give more flexibility in rendering the scene.

image


๐Ÿ“ฆ FBX Export Functionality

The FBX export feature enables the animation and 3D object to be baked together into a single file. This file is automatically saved within the Blender generation folder after rendering.

FBX files are widely supported and can be seamlessly imported into other tools such as:

  • ๐ŸŽฎ Unity
  • ๐ŸŽฅ Unreal Engine
  • ๐ŸŽจ Autodesk Maya
  • ๐ŸŒ NVIDIA Omniverse

This enhances interoperability across pipelines for animation, simulation, or game development workflows.

image

The .fbx file generated will be saved inside the folder named after the video, which contains the .ply objects produced by joints2smpl.

image


๐ŸŽฅ Video Export Functionality

Export settings such as resolution, frames per second (fps), and video file format can be adjusted in the export_video function.

This provides control over the output quality and compatibility of the rendered videos. The .mp4 file generated will be saved inside the folder named after the video, which also contains the .ply objects produced by joints2smpl.

image