TH Converter

Extract text from PyTorch models or photos (TH)


Drop or upload your .TH file

How to extract text from your TH file

  1. Click the "Select File" button above, and choose your TH file.
  2. You’ll see a preview, if available.
  3. Click the "Convert file to..." button to extract text information.

Convert TH to another file type

To convert TH Models or photos to another format, you need PyTorch or other Developer software.

Convert a file to TH

To convert other file formats to the "Serialized Machine Learning Model" file type, you need software like PyTorch or a similar tool.


About TH files

The .TH file extension is primarily a PyTorch Serialized Model Object. It stores the trained weights, biases, and sometimes the entire architecture of a machine learning neural network. Developers save these files to pause training or share models via the Torch Hub. Alternatively, a small percentage of .TH files are disguised JPG images created by Android mobile security applications (like Perfect App Protector) to secretly store photos of unauthorized users trying to unlock a phone. Another rare use is for Therion cave surveying data.

The main disadvantage of the .TH format in machine learning is that it relies on Python's pickle serialization. This makes it a proprietary, version-dependent, and inherently insecure format. You cannot open it in a standard text editor. Worse, loading an untrusted .TH file can execute malicious code on your machine. You also need the exact original Python class definitions to load the model properly.

To share these models across different frameworks (like TensorFlow) or hardware accelerators, developers must convert .TH files to the .ONNX (Open Neural Network Exchange) format. However, because .TH files are specialized serialized data, standard online converters fail to process them natively.

Just drag and drop your file to identify the format, view it, and convert it when possible. convert.guru can inspect the file signatures safely. If our analysis detects an embedded format, such as a standard ZIP archive (common in newer PyTorch saves) or a hidden JPG intruder image, viewing or extraction may still be possible without running risky Python code.

Convert.Guru analyzes your TH file, detects the exact format, and lets you read the text inside.

Users also converted ONNX, PTH, CKPT, MYR, SGD and GH files.


FAQ

If you want to convert TH file to MYR, SGD, GH, SHP, KML, KMZ, GPX, GEOJSON, TOPOJSON, TIF, TIFF or ECW, you can use PyTorch or similar software from the "Machine Learning Model Storage" category. In the File menu, look for Save As… or Export….

To convert LAZ, KMZ, DTM, CSV, DEM, PRJ, LAS, GPX, DSM, SHP, DBF or KML files to TH, try PyTorch or another comparable tool in the "Machine Learning Model Storage" category.



The TH Converter Story

The history of Convert.Guru began over 25 years ago in California with Tom Simondi’s file-format database. A former contributor to Space Shuttle development and a software pioneer of the 1980s, Simondi established a trusted resource for file type analysis that was even referenced by Microsoft Windows XP. Today, we use modern technology to process and convert thousands of file formats while continually improving our TH converter.