Useful Python Scripts
Over the past 6 months I have developed a series of python scripts which can help with 3D gaussian training in tools like Reality Capture, Agisoft Metashape, Jawset Postshot and Nerf Studio. The body scan seen in this lesson is courtesy of Xangle Studios.
Correction
In the video, I mention enabling the “Treat Zero Alpha as Mask” but you’ll actually want to disable it as Postshot seems to read the alpha mask automatically
3DGS Converter
3DSM Github Page
Image Processing
exif2csv.py
Python script to parse image exif metadata and compute exposure values into a CSV file then plot the exposure over time in a graph.
rtProcessImages.py
Python script using Raw Therapee CLI commands to read a raw therapee pp3 file then adjust white balance and adjust exposure to a defined EV value with an exposure offset.
addAlpha2image.py
This python script will automatically add a directory of image masks then add them as an alpha channel for corresponding imagery.
sortImagesIntoFolders.py
This python script will automatically sort a directory of images into folders based on the filename prefix.
Metashape
alignOptimizeCameras.py
This Agisoft Metashape Pro python script will automatically align, filter tie points and optimize cameras.
importMultiCameraRigMasks.py
This Agisoft Metashape Pro python script will automatically import masks on selected images for a multi-camera rig if subdirectory structure is the same.
adjustReference.py
This python script will adjust the pitch, roll, yaw angles defined by user input
lidarPano2reference.py
This python script will export lidar panorama positions to a reference file
adjustReference.py
This python script will adjust the pitch, roll, yaw angles defined by user input.
Point Clouds
ply2colmap.py
This python script will convert an ascii ply point cloud to a colmap compatible point cloud format.
Computer Vision / Segmentation
segmentImages.py
Python script to detect and mask objects using a trained Yolo segmentation model.