A 3D geometry format, also called the Stanford Triangle Format. It starts with an ASCII ply header; for Gaussian Splatting it stores per-point properties such as color, opacity, scale, and rotation.
PLY is a general-purpose 3D format, so for Gaussian Splatting check for properties such as opacity, scale, rotation, and spherical harmonics in addition to x/y/z.
It comes in ASCII, binary_little_endian, and binary_big_endian variants, so the header alone is not enough to read the data safely.
Detection example
SIGNATURE = bytes.fromhex("706c790a")
OFFSET = 0
def is_ply(path: str) -> bool:
with open(path, "rb") as f:
f.seek(OFFSET)
head = f.read(len(SIGNATURE))
return head == SIGNATURE
const SIGNATURE = [0x70, 0x6c, 0x79, 0x0a];
const OFFSET = 0;
// bytes: a Uint8Array / Buffer holding the start of the file
export function isPly(bytes) {
return SIGNATURE.every((byte, i) => bytes[OFFSET + i] === byte);
}
package fileid
import "bytes"
var isplySignature = []byte{0x70, 0x6c, 0x79, 0x0a}
const isplyOffset = 0
func IsPly(b []byte) bool {
end := isplyOffset + len(isplySignature)
if len(b) < end {
return false
}
return bytes.Equal(b[isplyOffset:end], isplySignature)
}
Polygon File Format is used in 3D viewers, asset pipelines, model conversion, avatar loading, and scene validation. Containers, extensions, binary chunks, and texture references all affect implementation behavior.
Common detection mistakes
The .ply extension alone does not prove the file contents. Upload and conversion flows should combine extension, MIME type, leading bytes, and format-specific structure checks.
Polygon File Format can start with signatures such as 70 6C 79 0A or 70 6C 79 0D 0A, but related containers and damaged files may require additional validation.
Security notes
Untrusted input is not safe just because the format was detected. Account for parser exceptions, large files, unexpected encodings, and external references.
Using samples
8 samples help test viewer loading, extension detection, and load time across file sizes.
Voxel51 Train 7k Gaussian Splat PLY is a Polygon File Format sample based on Hugging Face: Voxel51/gaussian_splatting. It can be used to test downloads, parsers, previews, and file type detection.
Voxel51 Train 30k Gaussian Splat PLY is a Polygon File Format sample based on Hugging Face: Voxel51/gaussian_splatting. It can be used to test downloads, parsers, previews, and file type detection.
Voxel51 Playroom 7k Gaussian Splat PLY is a Polygon File Format sample based on Hugging Face: Voxel51/gaussian_splatting. It can be used to test downloads, parsers, previews, and file type detection.
Voxel51 Playroom 30k Gaussian Splat PLY is a Polygon File Format sample based on Hugging Face: Voxel51/gaussian_splatting. It can be used to test downloads, parsers, previews, and file type detection.
Voxel51 Truck 7k Gaussian Splat PLY is a Polygon File Format sample based on Hugging Face: Voxel51/gaussian_splatting. It can be used to test downloads, parsers, previews, and file type detection.
Voxel51 Truck 30k Gaussian Splat PLY is a Polygon File Format sample based on Hugging Face: Voxel51/gaussian_splatting. It can be used to test downloads, parsers, previews, and file type detection.
Voxel51 Dr Johnson 7k Gaussian Splat PLY is a Polygon File Format sample based on Hugging Face: Voxel51/gaussian_splatting. It can be used to test downloads, parsers, previews, and file type detection.
Voxel51 Dr Johnson 30k Gaussian Splat PLY is a Polygon File Format sample based on Hugging Face: Voxel51/gaussian_splatting. It can be used to test downloads, parsers, previews, and file type detection.
What is the magic number (file signature) of Polygon File Format?
Polygon File Format files begin with the byte signature 70 6C 79 0A ("ply.") or 70 6C 79 0D 0A ("ply.."). Detect the format by reading these leading bytes rather than trusting the file extension alone.
What is the MIME type of Polygon File Format?
The MIME type for Polygon File Format is model/ply, application/octet-stream.
What file extension does Polygon File Format use?
Polygon File Format files use the .ply extension. The extension is a convention only and does not guarantee the file contents, so combine it with signature and structure checks.