<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Yonatan Abrams on Medium]]></title>
        <description><![CDATA[Stories by Yonatan Abrams on Medium]]></description>
        <link>https://medium.com/@yonatanf89?source=rss-17169f77d891------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*121gZgM161z5_764rhI2CQ.jpeg</url>
            <title>Stories by Yonatan Abrams on Medium</title>
            <link>https://medium.com/@yonatanf89?source=rss-17169f77d891------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 04:29:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yonatanf89/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ASL Spell Net: A Sign-Language-to-Speech Model]]></title>
            <link>https://medium.com/@yonatanf89/asl-spell-net-a-sign-language-to-speech-model-d0c9e1dcb5f7?source=rss-17169f77d891------2</link>
            <guid isPermaLink="false">https://medium.com/p/d0c9e1dcb5f7</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[accessibility]]></category>
            <category><![CDATA[seq2seq]]></category>
            <category><![CDATA[transformer-model]]></category>
            <category><![CDATA[sign-language]]></category>
            <dc:creator><![CDATA[Yonatan Abrams]]></dc:creator>
            <pubDate>Sun, 30 Jul 2023 11:29:57 GMT</pubDate>
            <atom:updated>2023-07-30T20:06:50.336Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sPr53tdhHGDKQyisuh8K8Q.png" /></figure><h3>Introduction: Increasing Accessibility With Machine Learning</h3><h4>Dismantling communication barriers</h4><p>Inclusivity and accessibility are concepts which assert the inherent value in everyone; that no one should be abandoned, overlooked nor marginalized.</p><p>Not unreasonably, new technologies are always implemented for the average user. However, this means that work needs to be done afterwards to fill the gaps in accessibility.</p><p>One such example is “voice-activation” technology, which is fundamentally inaccessible to those who rely on non-vocal communication, but sign language. Those who rely on sign language have no way of accessing this technology, and must either rely on others to operate these tools, interact with these tools in inconvenient ways, or not have access to these tools at all.</p><p>When engaging in these barrier-dismantling endeavours, it becomes clear also that there are other contexts which could benefit from these efforts, and we will now look deeper at two other avenues where accessibility should be increased for sign-language communicators.</p><h4>Healthcare: Making personal and private care accessible</h4><p>In the healthcare industry, practitioners often rely on the direct communication from their patients or clients to properly assess their situation. Because of this, miscommunication can lead to bad outcomes, whether over-estimation, under-estimation or even complete misunderstanding of the issue at-hand.</p><p>For members of the deaf community (for example) who rely on sign language to communicate, hired interpreters are commonplace when no family members or friends are available to interface with the professionals on their behalf.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*J8EopDLNZnrj-zwD" /><figcaption>Image source: <a href="https://www.yahoo.com/lifestyle/why-dangerous-doctors-misunderstand-chronic-200655305.html?guccounter=1&amp;guce_referrer=aHR0cHM6Ly93d3cuZ29vZ2xlLmNvbS8&amp;guce_referrer_sig=AQAAANMrx-sOwdrXbx8LBpcueEu-f9JOVOoT9FEYnnMrD7I4nGhf1SAVAINkxcwRdSRGNhTY9vz9q-WbH917HYIcx0tSMRgD2qF5Cw8BmFHa3u5-R5LxWmAXEiqLscnzh7gZ7St5TirqrWCfgiqH4IDyE5x2r2-YyzJAHGNn73jt4RD4">Yahoo</a>.</figcaption></figure><p>However, especially when considering the mental health context, having another person in the room interpreting can inhibit the full disclosure which is sometimes necessary for the healthcare professional to work effectively with the client. Therefore, there is a need for a technology which can give real-time transcription/interpretation of sign language to text, similar to Google’s new <a href="https://support.google.com/translate/answer/9724492?hl=en&amp;co=GENIE.Platform%3DAndroid">transcription tool</a> on their Translate app. This is a much better alternative to typing or writing on a white-board (two options which people sometimes resort to) for two main reasons:</p><p>Firstly, typing and writing are much less expressive than sign language, especially when considering facial expressions, and thus retains a dimension of human communication which is lost when written. As linguists who study grammar of sign language said,</p><blockquote>“<em>Facial expressions in sign language are used to express grammatical functions, such as question marking, but can also be used to express emotions”</em>. — Kimmelman, et. al, Eyebrow position in grammatical and emotional expressions in Kazakh-Russian Sign Language. PLoS ONE 15(6)</blockquote><p>Secondly, sign language is faster than typing, especially phone-typing. For example, someone fluent in American Sign Language could fingerspell 57 words per minutes on average, while the average American phone user can only type 36 words per minute on their phone. (<a href="https://www.kaggle.com/competitions/asl-fingerspelling">Kaggle</a>)</p><h4>Other applications of sign-language-to-speech technology</h4><p>A technology capable of translating sign language to text would make all voice-activated technologies accessible to those who communicate using sign language. This could enable members of the sign-language community to access technologies like Siri or Alexa, dictation- and transcription-software, as well as voice-recognition security measures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hsR6bUDE3PUPZCbW.jpg" /><figcaption>Image source: <a href="https://www.bewiser.co.uk/news/car-insurance/can-you-use-your-smartphone-sat-nav-car-passenger-seat-or-cup-holder">Be Wiser Insurance</a>.</figcaption></figure><p>Imagine a sign-language communicator is driving down the road and they are navigating themselves using Waze, Google Maps, or another sat-nav application. They realize that they need gas, so they want to add a gas station to their route. Someone who speaks could tell Siri (for example), “Siri, navigate me to the nearest gas station.” However, someone who cannot speak verbally would have to pull over and type instructions into their phone, wasting valuable time or causing a distirubance to traffic flow. (<em>We’re assuming, of course, that the driver would never consider typing on their phone while driving!</em>)</p><p>If this user had a sign-language-to-speech application enabled, then they could simply gesture to their camera (or double-tap the home-button and <em>then</em> gesture to their camera) with one hand and easily communicate their message to their phone.</p><h4>Fingerspelling-to-speech as a discrete sub-task of transcribing sign language in general</h4><p>Of course, sign language — and American Sign Language (ASL) in particular — is a robust language. As such, there are approximately 10,000 signs available, as well as characters to spell acronyms, emails, phone numbers, websites and other proper nouns and “character-strings” without direct semantic meaning. The latter task is called “fingerspelling” in the ASL context, and is the context of the project discussed in this article.</p><p>Developing a fingerspelling-to-speech model can be viewed as a standalone task independent (at least mostly) from the task of developing a model for transcribing videos of people signing full words because it consists of a discrete collection of letters, numerals and symbols which can be combined in any creative way a person chooses.</p><p>Let us begin our exploration of the dataset and dive in to the preprocessing stages we went through.</p><h3>Preprocessing our dataset</h3><p>The dataset used for this project was provided by Kaggle as part of their competition <a href="https://www.kaggle.com/competitions/asl-fingerspelling">ASL Fingerspelling Recognition</a> competition. The dataset is essentially large arrays of numbers representing videos of people fingerspelling phrases in ASL.</p><p>The distribution of phrase-types which are part of our dataset is shown in <strong>Figure 1</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yeePokEBGD1Hspp1A_xhwA.png" /><figcaption><strong>Figure 1. </strong>Distribution of Phrase types. Plot generated by Alon Mecilati.</figcaption></figure><p>Each of the <em>67,208</em> videos vary in terms of how many frames they contain, the longest video reaching 1000+ frames. The position of the hands and mouth of the person in each respective video is encoded in “landmarks”; namely, the <em>(x, y, z)</em> coordinates of the anchor-points which are commonly used in the Data Science space to define anatomic movements.</p><p><strong>Figure 2</strong> is an illustration of what the facial landmark data looks like when embedded onto a face:</p><figure><img alt="Two images of the same smiling Caucasian man with curly hair and white teeth, wearing a blue collared shirt. In the right image, facial landmarks are painted onto his face using a futuristic color scheme." src="https://cdn-images-1.medium.com/max/880/0*fk5Vo5dFUfxUxMwU.png" /><figcaption><strong>Figure 2</strong>. Facial landmark detection. (<a href="https://developers.google.com/mediapipe/solutions/vision/face_landmarker">MediaPipe documentation</a>)</figcaption></figure><p><strong>Figure 3</strong> is an example of hand landmark detection at work, identifying all 21 landmarks on a hand:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3aqtYo-0nZ3ROAke.png" /><figcaption><strong>Figure 3. </strong>Hand landmark detection. (<a href="https://developers.google.com/mediapipe/solutions/vision/hand_landmarker">MediaPipe documentation</a>)</figcaption></figure><p>Pretty quickly, it became clear that trying to fit a model to such long sequences of data in 3 dimensions would be an unreasonable task. Therefore, we performed two main preprocessing tasks.</p><p>Firstly, the 3rd dimension (the <em>z</em> dimension) complicated the model unnecessarily, as it was being approximated from 2-dimensional videos and being projected into 2 dimensional space. Therefore, we dropped the 3rd dimension altogether.</p><p>Secondly, since each video had hundreds of frames we needed to reduce the complexity of the dataset even further. Thus we used a bilinear interpolation algorithm implemented by TensorFlow to interpolate the sequence of frames into fewer frames. As an illustration of how linear and ultimately bilinear interpolation works, let’s look at simple examples (<strong>Fig. 4</strong> and <strong>Fig. 5</strong>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iGjZ0hGPY1SHbqkRbHOfcQ.png" /><figcaption><strong>Figure 4. </strong>Linear-interpolation. Created by the author on Canva.com.</figcaption></figure><p>The insight showcased in <strong>Figure 3</strong> is that when we are performing linear interpolation between an array with 4 spaces between its 5 elements to an array with 3 spaces between its 4 elements, the ratio of the distances between the former and the latter arrays is 4/3.</p><p><strong>Figure 5</strong> illustrates the difference between linear interpolation and bi-linear interpolation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c7RIzPu0j8w-swGdGRUajg.png" /><figcaption><strong>Figure 5 (A).</strong> Linear interpolation. (<strong>B). </strong>Bilinear interpolation. Created by author on Canva.com.</figcaption></figure><p>Ultimately, all the sequences in the dataset were bi-linearly interpolated down to 128 <em>(x, y) * [landmarks] </em>vectors, rendering each sample an array of shape <em>(128, 164).</em></p><p>After we completed this interpolation, we ended the preprocessing stage with a dataset with 67,208 samples, each with 128 frames for all 164 landmarks.</p><p>Now that we have our data, let’s discuss which metric we used in order to assess our models’ performances.</p><h3>The Levenshtein Distance</h3><h4>When accuracy is inaccurate</h4><p>A popular choice for classification tasks is accuracy, which measures the percentage of correctly classified samples out of the total. In our task, we can assess accuracy either by classifying entire strings or by analyzing accuracy at the character level. However, this approach doesn’t account for extra or missing characters in predictions. For instance, if the true word is “word” and the prediction is “world,” the per-word accuracy would be 0%, which may not accurately represent the model’s success. Additionally, calculating the average per-character accuracy for the word wouldn’t be well defined.</p><h4>Using Levenshtein distance instead of accuracy</h4><p>The Levenshtein Distance is an apt way to measure the similarity between words, and it is robust in areas where accuracy fails. Levenshtein distance is defined by the number of one-character edits which are necessary to convert one word to another, and better Levenshtein scores are characterized by being closer to 0. In other words: the small the better.</p><p>Each of the following three types of single-character edits would increase the Levenshtein distance by 1:</p><ol><li><strong>Insertion:</strong> If a character is missing from the predicted word.</li><li><strong>Deletion:</strong> If a redundant character is included in the predicted word.</li><li><strong>Substitution:</strong> If a character in the predicted word needs to be substituted for another character.</li></ol><p><strong>Figure 6 </strong>illustrates each character edit type. Each of these examples has a Levenshtein distance of 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*FWkB8ilIjJIMua46H7OurQ.png" /><figcaption><strong>Figure 6.</strong> Examples of one-character edits. Created by the author on Canva.com.</figcaption></figure><h3>How well would a naïve model perform?</h3><p>The maximum Levenshtein distance that two words can have from each other is equal to the length of the longer word. This is because the worst possible guess is to make no guess at all, and thus if the true word is 10 characters long 10 characters need to be inserted into a blank word in order to equate the words. With this in mind, we will rehearse the development of our benchmarks performance metric using a naïve classification model.</p><p>We can define our naïve model as a model which always predicts a “word” with no characters (an “empty string” in data parlance), thus achieving an average Levenshtein distance equal to the average length of the actual words across all samples in the validation set.</p><p>When applied to our validation set, this naïve model scores a Levenshtein distance of 18.81.</p><h3>Baseline model: LSTM network</h3><p>Sequence to sequence (Seq2seq) tasks require a model to be able to process input sequences and generate corresponding output sequences. One powerful model for such a task is the Long Short-Term Memory (LSTM) network, which is a type of Recurrent Neural Network (RNN) architecture.</p><p>RNNs are a natural choice for Seq2seq tasks, as they retain a memory of what came before each respective sample and considers that memory along with the current sample it is interpreting. LSTM layers in an RNN model provide a solution to two of an RNN’s potential pitfalls; namely, the “exploding gradient problem” and the “vanishing gradient problem” which arise during the backpropagation of sequenced data. (For a lengthier, but accessible, explanation of how LSTMs redeem RNNs, see this explanation by <a href="https://www.quora.com/How-does-LSTM-help-prevent-the-vanishing-and-exploding-gradient-problem-in-a-recurrent-neural-network">Ottokar Tilk</a>.)</p><p>LSTMs are particularly popular in a wide range of Natural Language Processing (NLP) tasks, including machine translation, speech recognition, text summarization and handwriting recognition. They can generally handle sample sequences of varying lengths and capturing and encoding information of subtle changes over time.</p><p>However, LSTMs didn’t perform well for our task at all. The best average Levenshtein distance score across all samples was 15.206, not much better than the 18.81 achieved by the naïve model.</p><h3>Transformer Model</h3><p>After the LSTM network gave us unsatisfactory results, we turned our attention towards Transformer models.</p><p>Transformer models can accept as input sequences which vary in their lengths, which is essential for our task. The attention mechanism of transformer models which enables the model to focus on relevant parts of the input sequences while encoding also makes them a good choice for our task. One ore reason why transformer models are great for our task is that we would like to ultimately use the model in real time, and the ability for transformers to process and entire sequence in parallel significantly speeds up the prediction process.</p><p>Let’s now discuss how our Transformer model performed at this sign-language-to-speech task.</p><h3>Performance Evaluation and Results</h3><p>As we saw before, the LSTM model out-performed the naïve model, each with a mean Levenshtein distance of 15.206 and 18.81 across all samples respectively.</p><p>The mean Levenshtein score from the transformer model was 6.09, smashing the results from the LSTM. Below we show some results from the tranformer model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TdkG5M55Pbi6mQS3aU3HGw.png" /><figcaption><strong>Figure 7.</strong> Plots generated by Alon Mecilati.</figcaption></figure><p>In the first plot of <strong>Figure 7</strong>, we see the distribution of phrase lengths throughout the dataset. In the second plot of <strong>Figure 7</strong>, we see the corresponding mean Levenshtein distance for each phrase length. The model was most successful with phrases of length 12, which is perhaps because the dataset had many phone numbers in the form of “000–000–0000”, which is 12 characters long.</p><p>In <strong>Figure 8</strong>, we see all of the Levenshtein distances accross all samples in the test set.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K7fQQitoSaCO8Nb3S_aepg.png" /><figcaption><strong>Figure 8. </strong>Plot generated by Alon Mecilati.</figcaption></figure><p>In <strong>Figures 9–10</strong> we see how the model performed with respect to each character.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a-RhWB7Q1yq_rSIrhM2sbQ.png" /><figcaption><strong>Figure 9.</strong> How many times is each character used in the dataset. Plot generated by Alon Mecilati.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H8dsj8vBqxpHT6XnQZTbzA.png" /><figcaption><strong>Figure 10.</strong> Plot generated by Alon Mecilati.</figcaption></figure><h3>Conclusion</h3><p>Our goal is to work towards creating more opportunities and increasing accessibility for members of the American Sign Language community.</p><p>Working from the Kaggle dataset, we prepared the data for an LSTM model which didn’t perform well enough. Moving to transformer model showed hints of success, averaging a Levenshtein distance of 6.09 between the true phrase and the predicted phrase.</p><p>Some ways to improve the model include keeping 256 frames post-bilinear interpolation rather than just 128, or keeping a number of frames proportional to the original sequence’s length. It could be that the “attention” that the transformer model pays to the context would be more realistic and show better results. We could also try to increase the dataset to be more balanced. As it is, a huge percentage (see <strong>Fig. 7</strong>) of our dataset is 12 characters long. We might see better results if we augment the dataset by adding more phrases from another source. However, it would be exceedingly difficult to augment the dataset without being able to record proficient ASL fingerspellers or by somehow labelling each frame of the original sequences to identify which timestamps correspond to which characters.</p><p>We look forward to what lies ahead, and thank you for your interest in our project!</p><h4>Our team</h4><ul><li>Alon Mecilati: <a href="https://www.linkedin.com/in/alon-mecilati/">LinkedIn</a>, <a href="https://github.com/Altonormz">GitHub</a></li><li>Ariel Drabkin: <a href="https://www.linkedin.com/in/ariel-drabkin-6b361212a/">LinkedIn</a>, <a href="https://github.com/ArielDrabkin">GitHub</a></li><li>Alex Makienkov</li><li>Yonatan Abrams: <a href="https://www.linkedin.com/in/yabrams/">LinkedIn</a>, <a href="https://github.com/yoniabrams">GitHub</a></li></ul><h4>Thanks</h4><p>Special thanks to our outstanding Mentor <strong>Danielle Kapon Epshtain</strong> (<a href="https://www.linkedin.com/in/danielle-kapon-epshtain-687726bb/">LinkedIn</a>) who has taught us and motivated us a great deal throughout this project and throughout our time studying Data Science at Israel Tech Challenge.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d0c9e1dcb5f7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>