Lightning Talk: HieroGlyph2Text: A PyTorch-Powered Pipeline for Automated Egyptian H... Susi Gentsch

PyTorch · Advanced ·🧠 Large Language Models ·1y ago

Key Takeaways

The video presents a PyTorch-powered pipeline called HieroGlyph2Text for automated Egyptian hieroglyph translation from images, utilizing object detection, classification, and language models.

Full Transcript

thanks everybody for coming today I will present to you my project my bachelor thesis about I will present to you how I set up a pipeline to translate Egyptian hieroglyphs from an image first a bit about myself my name is suan Gen and I'm currently finishing up my bachelor degree at the University of Bon studying computer science with a focus on computer vision the project that I'm presenting today to you is done in cooperation with Bond train a program of my school where students and AI experts come together with subject matter experts to find solution for their problems here's a quick overview about my pipe about heroglyph to text at first the user inputs a image with a prompt with object detection the pipeline then cuts out the single hers and passes them into the classification model which returns Garner codes these par codes are then translated with a language model using Rag and out comes the English an attempted English translation I want to go give you a quick overview about what I'm talking today at first I cut down the problem then I will present to you the data sets that I used to train the models followed by going in depth about the heroglyph detection the classification that I have done with pytorch and a translation that's done using rag with Lama 3.1 in the end I will give you a quick demonstration about how it works first when we want to translate heroglyph from an image this problem can be cut down into three sub problems first the detection of the hieroglyphs then their classification followed by the translation since you can't write hieroglyphs with your keyboard egyptologist use Gardener codes as a lookup table for them as we all learn in elementary school tool I'm sure we know that this small image of a bird is called g17 a few challenges when it comes to dealing with hieroglyphs are first of all there are a lot of them hundreds of them and when we see them in the field they're often not perfect they're malformed are an irregular grouping and when it comes to the translation the same group of heroglyph doesn't always mean the same thing have the same translation the translation often depends on and the broader context of where the hieroglyphs appear the data sets that I used for my model training are first of all the Frank Morris data set for the image detection and classification this is a data set with images with 10 images of the walls of the pyramids of unas along with them are about 4,000 annotated image of images of individual hieroglyphs along 162 class of different Gardener codes for the language part I created a custom rack data set that contains about 1,000 lines entries saved in adjacent lines format that and each entry contains a unique Gardener code its description and or and or ideogram this is what these data set of the small images look like and here are a few example lines of the r data set now to the object detection for the object detection I decided to go with yolo V8 because it performs very well at detecting small images on large small objects on large images I trained to detect various types of hieroglyphs in an image the data set I used for that I split 70% into training 20% to validation and 10% for test now to the classification part I designed my classification model with pie torch the key points why I use pouch for this was first of all pyou has a rich ecosystem of pre-trained models like rnet and libraries that help to work with it then secondly its Dynamic computational graph was very helpful to adapt P to adapt rest net to my specific needs the py torch data loader further made it very easy to load and Shuffle the data around during the training another benefit of py toch was the seamless GPU integration when I get the when the object detection Returns the cutout images of heroglyph they're not in the perfect in a perfect square shape what reset needs to work with them so at first I standardized the image size and then I increased the and then I increased my data set by doing some standard augmentations with t vision. transform the final classification model that I ended up using was the result of extensive experimentation with different architectures and configurations of resnet the best performing model was a customized version of reset 50 in which I adapt in which the key modifications that I applied were first that I changed the input layer to only accept grayscale images and secondly I changed the final layer to be adjusted for the custom amount of classes of gardener codes appearing in the data set I split the data for the training 70% for training 70% for training 15% for validation and 15% for test the accuracy on the test data ended up being 94% which exceeds previously published results now to the final part of my pipeline the translation when I started with this part of the project Lama 3 just came out and it was not able to translate a Garder codes this is why I had to teach it what Gardner codes meant I tried to put this in a prompt input but the context window of llama 3 three was too small at the time this is why I created a my wreck my R is can be cut down into four key Parts first the indexing the retrieval augmentation and generation for the indexing I created embeddings of the rec data set with llama 3.1 these I saved in a locally in a local chroma DB Vector database once I have the database I can use it the Garner codes from the image models are being passed to the retrieval which generates embeddings for each Garner code and retrieves the matching information in the chroma DB data set base the retriev data is being saved in a dictionary containing the Gardner code description and ideogram this information is then being passed to the augmentation stage where I constructed a detailed prompt containing the received dictionary and the trans and a detailed translation instruction that emphasizes to that tells the model to emphasize on the meaning of the heroglyph rather than linguistic accuracy this prompt is then being passed into Lama 3.1 and it returns a translation here's an example of an image of the pyramids of unas I have a I passed it into my heroglyph to to text pip line and I had the first 20 hieroglyphs being translated at first the language at first the heroglyph to text Returns the Garder each Garner code with their description with their meaning and then it tries to form sentences of them of with all Garner codes combined to put it all together I created an image to text pipeline to translate Egyptian her gloves this combines computer vision with Lang lar language models in the end I used YOLO V8 for the heroglyph detection and a customized reset model for the classification the translation then happens with Lama 3.1 using my Rec system this brings an interpretive translation of hieroglyphic imagery this project lays the groundwork for egyptologists to share their knowledge and with a ease of TR talking to a language mod large language model and with their knowledge we can achieve automated real legitimate translation of Egyptian hieroglyphs I appreciate your interest in this topic and I'm open to questions thank you

Original Description

Lightning Talk: HieroGlyph2Text: A PyTorch-Powered Pipeline for Automated Egyptian Hieroglyph Translation from Image - Susi Gentsch, University of Bonn HieroGlyph2Text is an innovative PyTorch-powered pipeline that automates the detection, classification, and attempts translation of Egyptian hieroglyphs from large image inputs. It addresses the challenge of decoding and translating ancient hieroglyphic inscriptions, traditionally a time-consuming and specialized task. This pipeline leverages PyTorch to create custom models: 1. Object Detection: YOLOv8 accurately detects individual hieroglyphs within images. 2. Image Classification: A custom ResNet model built using PyTorch achieves state-of-the-art accuracy in assigning Gardiner Codes to hieroglyphs. 3. Translation: The classified Gardiner Codes outputs from the ResNet model are integrated with Llama3, a large language model (LLM), using Retrieval-Augmented Generation (RAG) and a custom dataset based upon Gardiner Codes and their respective description and ideogram. Key highlights include accurate hieroglyph detection and state-of-the-art classification performance through an optimized ResNet model. This pipeline lays the groundwork for collaboration with subject matter experts to refine the translation process and democratize access to ancient Egyptian hieroglyphic knowledge.
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from PyTorch · PyTorch · 0 of 60

← Previous Next →
1 What is PyTorch?
What is PyTorch?
PyTorch
2 PyTorch Tutorial: A Quick Preview
PyTorch Tutorial: A Quick Preview
PyTorch
3 PyTorch Summer Hackathon 2019
PyTorch Summer Hackathon 2019
PyTorch
4 Tips and Tricks on Hacking with PyTorch: A Quick Tutorial by Brad Heintz
Tips and Tricks on Hacking with PyTorch: A Quick Tutorial by Brad Heintz
PyTorch
5 PyTorch 1.2 and PyTorch Hub: A Quick Introduction by Soumith Chintala and Ailing Zhang
PyTorch 1.2 and PyTorch Hub: A Quick Introduction by Soumith Chintala and Ailing Zhang
PyTorch
6 Torchtext 0.4 with Supervised Learning Datasets: A Quick Introduction by George Zhang
Torchtext 0.4 with Supervised Learning Datasets: A Quick Introduction by George Zhang
PyTorch
7 Torchaudio 0.3 with Kaldi Compatibility, New Transforms: A Quick Introduction by Jason Lian
Torchaudio 0.3 with Kaldi Compatibility, New Transforms: A Quick Introduction by Jason Lian
PyTorch
8 Torchvision 0.4 with Support for Video: A Quick Introduction by Francisco Massa
Torchvision 0.4 with Support for Video: A Quick Introduction by Francisco Massa
PyTorch
9 Introduction to Machine Learning for Developers at F8 2019
Introduction to Machine Learning for Developers at F8 2019
PyTorch
10 Powered by PyTorch at F8 2019
Powered by PyTorch at F8 2019
PyTorch
11 Developing and Scaling AI Experiences at Facebook with PyTorch at F8 2019
Developing and Scaling AI Experiences at Facebook with PyTorch at F8 2019
PyTorch
12 New Approaches to Image and Video Reconstruction Using Deep Learning at Facebook at F8 2019
New Approaches to Image and Video Reconstruction Using Deep Learning at Facebook at F8 2019
PyTorch
13 PyTorch Developer Conference 2018: Recap
PyTorch Developer Conference 2018: Recap
PyTorch
14 PyTorch Developer Conference 2018: Keynote & Deep Dive
PyTorch Developer Conference 2018: Keynote & Deep Dive
PyTorch
15 PyTorch Developer Conference 2018: Production & Research Sessions
PyTorch Developer Conference 2018: Production & Research Sessions
PyTorch
16 PyTorch Developer Conference 2018: Cloud & Academia Sessions
PyTorch Developer Conference 2018: Cloud & Academia Sessions
PyTorch
17 PyTorch Developer Conference 2018: Enterprise, Education, & Future of AI Panel
PyTorch Developer Conference 2018: Enterprise, Education, & Future of AI Panel
PyTorch
18 PyTorch Developer Conference 2019 | Full Livestream
PyTorch Developer Conference 2019 | Full Livestream
PyTorch
19 PyTorch Developer Conference 2019: Recap
PyTorch Developer Conference 2019: Recap
PyTorch
20 PyTorch Developer Conference Keynote - Mike Schroepfer
PyTorch Developer Conference Keynote - Mike Schroepfer
PyTorch
21 What’s new in PyTorch 1.3 - Lin Qiao
What’s new in PyTorch 1.3 - Lin Qiao
PyTorch
22 PyTorch Front-End Features: Named Tensors and Type Promotion - Gregory Chanan
PyTorch Front-End Features: Named Tensors and Type Promotion - Gregory Chanan
PyTorch
23 Research to Production: PyTorch JIT/TorchScript Updates - Michael Suo
Research to Production: PyTorch JIT/TorchScript Updates - Michael Suo
PyTorch
24 Quantization - Dmytro Dzhulgakov
Quantization - Dmytro Dzhulgakov
PyTorch
25 PyTorch ONNX Export Support - Lara Haidar, Microsoft
PyTorch ONNX Export Support - Lara Haidar, Microsoft
PyTorch
26 Apex -  Michael Carilli, NVIDIA
Apex - Michael Carilli, NVIDIA
PyTorch
27 Dataloader Design for PyTorch - Tongzhou Wang, MIT
Dataloader Design for PyTorch - Tongzhou Wang, MIT
PyTorch
28 Linear Algebra in PyTorch - Vishwak Srinivasan, CMU
Linear Algebra in PyTorch - Vishwak Srinivasan, CMU
PyTorch
29 PyTorch Mobile - David Reiss
PyTorch Mobile - David Reiss
PyTorch
30 Model Interpretability with Captum - Narine Kokhilkyan
Model Interpretability with Captum - Narine Kokhilkyan
PyTorch
31 Detectron2 - Next Gen Object Detection Library - Yuxin Wu
Detectron2 - Next Gen Object Detection Library - Yuxin Wu
PyTorch
32 Speech Extensions to Fairseq - Dmytro Okhonko
Speech Extensions to Fairseq - Dmytro Okhonko
PyTorch
33 PyTorch on Google Cloud TPUs - Google, Salesforce, Facebook
PyTorch on Google Cloud TPUs - Google, Salesforce, Facebook
PyTorch
34 PyTorch Summer Hackathon Winners - Joe Spisak, Sebastien Arnold, Tristan Deleu
PyTorch Summer Hackathon Winners - Joe Spisak, Sebastien Arnold, Tristan Deleu
PyTorch
35 PyTorch in Robotics - Yisong Yue, Caltech
PyTorch in Robotics - Yisong Yue, Caltech
PyTorch
36 StanfordNLP - Yuhao Zhang, Stanford
StanfordNLP - Yuhao Zhang, Stanford
PyTorch
37 Sotabench for Reproducible Research - Robert Stojnic, Papers with Code
Sotabench for Reproducible Research - Robert Stojnic, Papers with Code
PyTorch
38 Collaborative Natural Language Inference - Sasha Rush, Cornell
Collaborative Natural Language Inference - Sasha Rush, Cornell
PyTorch
39 Privacy Preserving AI - Andrew Trask, OpenMined
Privacy Preserving AI - Andrew Trask, OpenMined
PyTorch
40 CrypTen - Laurens van der Maaten
CrypTen - Laurens van der Maaten
PyTorch
41 PyTorch at Uber - Sidney Zhang, Uber
PyTorch at Uber - Sidney Zhang, Uber
PyTorch
42 PyTorch at Tesla - Andrej Karpathy, Tesla
PyTorch at Tesla - Andrej Karpathy, Tesla
PyTorch
43 PyTorch at Microsoft - Saurabh Tiwary, Microsoft
PyTorch at Microsoft - Saurabh Tiwary, Microsoft
PyTorch
44 PyTorch at Dolby Labs - Vivek Kumar, Dolby Labs
PyTorch at Dolby Labs - Vivek Kumar, Dolby Labs
PyTorch
45 PyTorch Developer Conference 2019 - Panel Discussion
PyTorch Developer Conference 2019 - Panel Discussion
PyTorch
46 Using deep learning and PyTorch to power next gen aircraft at Caltech
Using deep learning and PyTorch to power next gen aircraft at Caltech
PyTorch
47 Named Tensors, Model Quantization, and the Latest PyTorch Features - Part 1
Named Tensors, Model Quantization, and the Latest PyTorch Features - Part 1
PyTorch
48 TorchScript and PyTorch JIT | Deep Dive
TorchScript and PyTorch JIT | Deep Dive
PyTorch
49 Announcing the PyTorch Global Summer Hackathon 2020
Announcing the PyTorch Global Summer Hackathon 2020
PyTorch
50 Opening Up the Black Box: Model Understanding with Captum and PyTorch
Opening Up the Black Box: Model Understanding with Captum and PyTorch
PyTorch
51 PyTorch Mobile Runtime for Android
PyTorch Mobile Runtime for Android
PyTorch
52 Torchvision in 5 minutes
Torchvision in 5 minutes
PyTorch
53 3D Deep Learning with PyTorch3D
3D Deep Learning with PyTorch3D
PyTorch
54 What is Torchtext?
What is Torchtext?
PyTorch
55 TorchAudio: A Quick Intro
TorchAudio: A Quick Intro
PyTorch
56 PyTorch Mobile Runtime for iOS
PyTorch Mobile Runtime for iOS
PyTorch
57 PySlowFast: Deep learning with Video
PySlowFast: Deep learning with Video
PyTorch
58 PyTorch Pruning | How it's Made by Michela Paganini
PyTorch Pruning | How it's Made by Michela Paganini
PyTorch
59 Measuring Fairness in Machine Learning Systems
Measuring Fairness in Machine Learning Systems
PyTorch
60 PyTorch for Hackathons
PyTorch for Hackathons
PyTorch

The video demonstrates a pipeline for automated Egyptian hieroglyph translation from images, combining computer vision and language models. The pipeline utilizes object detection, classification, and language models to translate hieroglyphs.

Key Takeaways
  1. Detect hieroglyphs in an image using YOLO V8
  2. Classify detected hieroglyphs using a customized ResNet model
  3. Translate classified hieroglyphs using Llama 3.1 and RAG
💡 The pipeline combines computer vision and language models to achieve automated translation of Egyptian hieroglyphs, laying the groundwork for egyptologists to share their knowledge and achieve legitimate translation.

Related Reads

Up next
5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
Dave Ebbelaar (LLM Eng)
Watch →