Image Classification
MediaPipe
French
sign-language
french-sign-language
lsf
fingerspelling
hand-landmarks
Run this model with HF Jobs
Run CodeEliott/lsf-alphabet on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/CodeEliott/lsf-alphabet. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/CodeEliott/lsf-alphabet on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use CodeEliott/lsf-alphabet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MediaPipe
How to use CodeEliott/lsf-alphabet with MediaPipe:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Open LSF alphabet model v0.1
Browse filesFiles changed (5)
- LICENSEAdded+201
- README.mdAdded+46
- VIDEOS.mdAdded+29
- demo.jsAdded+87
- letters.jsonAdded
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.12345678910111213141516171819202122232425262728293031323334353637383940414243444546---license: apache-2.0language:- frtags:- sign-language- french-sign-language- lsf- fingerspelling- mediapipe- hand-landmarkspipeline_tag: image-classification---
# Open LSF alphabet model (v0.1)
Recognises the **26 letters of the French Sign Language (LSF) alphabet** from MediaPipe hand landmarks, in real time, in the browser. To our knowledge, the first open model for the LSF alphabet.
- **Demo:** https://codeeliott.github.io/lsf-alphabet/demo/ (your video never leaves your browser)- **Code, data list, how to use:** https://github.com/CodeEliott/lsf-alphabet- **Authors:** Eliott Montagnon and Leonardo (CentraleSupélec).
## Intended useHints for people learning the LSF alphabet; research on sign language recognition. **Alphabet only**, one letter at a time: it does not understand LSF signs, sentences or facial expressions. Not for grading, certifying or identifying anyone.
## Input and output- **Input:** 60 numbers from MediaPipe's 21 hand points: points 1 to 20 minus the wrist, x scaled by the picture's width/height, divided by the 3D distance from the wrist to the middle knuckle (`features()` in `demo.js`).- **Model:** standardise, then a small neural network 60 → 128 → 64 → 26 (ReLU), softmax. One JSON file, 129 KB (`letters.json`).- **Output:** a probability for each letter a to z.
## EvaluationOn signers never seen in training, every letter checked by a person:- 5 YouTube signers held out: **93%** (118/127 letters), with the model trained on the other 14. The published file is then trained on all 19.- A Deaf signer recorded with our webcam page: 87% (45/52 tries).- Baseline, nearest match to one reference signer: 80%.
Common confusions: F/T, H/I, X/V, U/R, D/R, P with Q or Z. J and Z move, and the model sees one picture at a time.
## Training dataHand points from **19 public YouTube videos** of people signing the LSF alphabet (list and credits in `VIDEOS.md` on GitHub). One is CC BY (Laura Jauvert); the others are used under the EU text-and-data-mining exception (Directive 2019/790, art. 4), skipping channels that opt out. Videos were deleted after tracking; no video, picture, face or hand points are published. Letters were placed by a program (A to Z order) and checked by a person where in doubt. Anyone can ask for their video to be removed: open an issue on GitHub.
## Limitations19 signers, mostly adults filmed from the front. Children, unusual lighting and side views are untested. The rate at which a badly made letter is accepted as right is not measured yet. Regional variants may be missed.
## CitationMontagnon, E. and Leonardo (2026). Open LSF alphabet model, v0.1. https://github.com/CodeEliott/lsf-alphabet1234567891011121314151617181920212223242526272829# Source videos
The model learned from the hand points of these 19 public YouTube videos: one person signing the LSF alphabet in each.We downloaded each video, tracked the hand (21 points per picture, with MediaPipe), and **deleted the video right away**. We keep and publish no video, no picture and no face: only this list of links.
Videos under a standard YouTube licence are used under the EU text-and-data-mining exception (Directive 2019/790, article 4). We skip any channel that says no to data mining.**Your video is here and you want it out?** Open an issue or write to us: we remove it from the list and from the next model.
| # | Channel | Video | Licence | Used for ||---|---|---|---|---|| 1 | Je m'iniSigne | [La dactylologie / Je m'iniSigne](https://www.youtube.com/watch?v=07J8hKW8oj4) | YouTube standard | training || 2 | Clémence Chapotot | [Lsf leçon 1 « apprend abc... »](https://www.youtube.com/watch?v=7Q6vO50ryaU) | YouTube standard | training || 3 | Silence ça Signe | [La Dactylologie](https://www.youtube.com/watch?v=G_x6WX6kzD4) | YouTube standard | training || 4 | La Boîte à Signes | [Alphabet en LSF ( ABC)](https://www.youtube.com/watch?v=HISRNuTnuWQ) | YouTube standard | training (and the 5-signer benchmark, with a model trained without them) || 5 | Aymeline LSF | [L'alphabet en LSF ! (dactylologie)](https://www.youtube.com/watch?v=H_DZk-fDDV8) | YouTube standard | training (and the 5-signer benchmark, with a model trained without them) || 6 | Jean Philippe | [Alphabet LSF](https://www.youtube.com/watch?v=LEGufnt4As8) | YouTube standard | training || 7 | Open you mind | [Challenge alphabet LSF avec Julie !](https://www.youtube.com/watch?v=OvE_pPXP8Us) | YouTube standard | training || 8 | Sophie Vouzelaud | [Sophie Vouzelaud vous apprend l'alphabet en langue des signes](https://www.youtube.com/watch?v=QrOdNX32HyA) | YouTube standard | training (and the 5-signer benchmark, with a model trained without them) || 9 | MAE Langue des Signes | [La dactylologie française](https://www.youtube.com/watch?v=X7IwChDRG-4) | YouTube standard | training (and the 5-signer benchmark, with a model trained without them) || 10 | Langue des signes | [Alphabet en langue des signes française](https://www.youtube.com/watch?v=XQEFR5YmIP4) | YouTube standard | training || 11 | Mariandy ASMR | [Je t’apprends l’alphabet en langue des signes française. #asmr #lsf #alphabet](https://www.youtube.com/watch?v=YKDTxvfU_6E) | YouTube standard | training || 12 | ANNIE CRÉA PASSION | [Cours LSF : l’alphabet LSF + révisions](https://www.youtube.com/watch?v=Yz41S3J2MK8) | YouTube standard | training || 13 | Walter Learning | [Alphabet de la langue des signes française](https://www.youtube.com/watch?v=ZJ76KuoAiKg) | YouTube standard | training (and the 5-signer benchmark, with a model trained without them) || 14 | Marlène Loup | [Dactylologie (Alphabet sourd)](https://www.youtube.com/watch?v=d3szrbozIXU) | YouTube standard | training || 15 | Langue des Signes avec ELFS | [Alphabet LSF : Peux tu le faire ?](https://www.youtube.com/watch?v=f4lNBEPd_gA) | YouTube standard | training || 16 | CODA | [Langue des signes : l’alphabet](https://www.youtube.com/watch?v=jg5zXcN2tlY) | YouTube standard | training || 17 | Léa Descamps | [APPRENDS L'ALPHABET EN LSF EN QUELQUES MINUTES](https://www.youtube.com/watch?v=k9MYUafPt4s) | YouTube standard | training || 18 | jauvert laura | [Alphabet et Chiffres en LSF](https://www.youtube.com/watch?v=sK3NyDGAO48) | CC BY | training || 19 | Dicoplus LSF | [Dactylologie - la LSF point par point - Apprendre la langue des signes française gratuitement](https://www.youtube.com/watch?v=ytC9vbwFiuE) | YouTube standard | training |123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687// Live demo of the open LSF alphabet model. Webcam -> MediaPipe hand points -> 60 numbers -> model -> letter.// Everything runs in the browser; only the tracker (MediaPipe, from Google's servers) and model/letters.json load.import { FilesetResolver, HandLandmarker } from "https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.14/vision_bundle.mjs";
const $ = id => document.getElementById(id);const model = await (await fetch("model/letters.json")).json();const SMOOTH = 8; // average the last 8 pictures: one shaky picture doesn't flip the letterconst BONES = [[0, 1, 2, 3, 4], [0, 5, 6, 7, 8], [5, 9, 10, 11, 12], [9, 13, 14, 15, 16], [13, 17], [0, 17, 18, 19, 20]];
// The signing hand: the only hand seen, or the higher one (the other one rests lower)const signingHand = hands => hands.length ? hands.reduce((a, b) => (b[0].y < a[0].y ? b : a)) : null;
// The hand as 60 numbers: points 1..20 minus the wrist, x made square with the picture (aspect = width / height),// divided by the hand's size in 3D (wrist to middle knuckle), x flipped for left-handed signers.export function features(hand, aspect, leftHanded = false) { const w = hand[0], m = hand[9], sx = leftHanded ? -1 : 1; const size = Math.hypot((m.x - w.x) * aspect, m.y - w.y, (m.z - w.z) * aspect) || 1e-6; const out = []; for (let i = 1; i < 21; i++) { const p = hand[i]; out.push(sx * (p.x - w.x) * aspect / size, (p.y - w.y) / size, (p.z - w.z) * aspect / size); } return out;}
// The model: scale, layers with ReLU, softmax. Returns one probability per letter (model.letters).export function predict(x) { let z = x.map((v, i) => (v - model.mean[i]) / model.scale[i]); model.layers.forEach(({ w, b }, n) => { z = b.map((bj, j) => z.reduce((s, zi, i) => s + zi * w[i][j], bj)); if (n < model.layers.length - 1) z = z.map(v => Math.max(0, v)); }); const top = Math.max(...z), e = z.map(v => Math.exp(v - top)), sum = e.reduce((a, b) => a + b, 0); return e.map(v => v / sum);}
function draw(hand) { const c = $("draw"), v = $("video"), ctx = c.getContext("2d"); c.width = v.videoWidth; c.height = v.videoHeight; ctx.clearRect(0, 0, c.width, c.height); if (!hand) return; ctx.strokeStyle = "#5b8def"; ctx.lineWidth = 4; ctx.lineCap = "round"; for (const bone of BONES) { ctx.beginPath(); bone.forEach((i, n) => ctx[n ? "lineTo" : "moveTo"](hand[i].x * c.width, hand[i].y * c.height)); ctx.stroke(); }}
function show(p) { if (!p) { $("letter").textContent = "·"; $("sure").textContent = "Montre ta main"; $("bars").textContent = ""; return; } const top = model.letters.map((l, i) => [l, p[i]]).sort((a, b) => b[1] - a[1]).slice(0, 3); $("letter").textContent = top[0][0].toUpperCase(); $("sure").textContent = top[0][1] > 0.6 ? "sûr" : top[0][1] > 0.35 ? "plutôt" : "hésite"; $("bars").innerHTML = top.map(([l, v]) => `<div class="bar"><span>${l.toUpperCase()}</span><i style="width:${Math.round(v * 200)}px"></i>${Math.round(v * 100)}%</div>`).join("");}
async function start() { $("start").hidden = true; $("sure").textContent = "Chargement du suivi des mains…"; const video = $("video"); video.srcObject = await navigator.mediaDevices.getUserMedia({ video: { facingMode: "user", width: 640, height: 480 } }); await video.play(); const vision = await FilesetResolver.forVisionTasks("https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.14/wasm"); const tracker = await HandLandmarker.createFromOptions(vision, { runningMode: "VIDEO", numHands: 2, baseOptions: { modelAssetPath: "https://storage.googleapis.com/mediapipe-models/hand_landmarker/hand_landmarker/float16/1/hand_landmarker.task" } }); const recent = []; const loop = () => { const hand = signingHand(tracker.detectForVideo(video, performance.now()).landmarks); draw(hand); if (hand) { recent.push(predict(features(hand, video.videoWidth / video.videoHeight, $("left").checked))); if (recent.length > SMOOTH) recent.shift(); show(recent[0].map((_, i) => recent.reduce((s, p) => s + p[i], 0) / recent.length)); } else { recent.length = 0; show(null); } requestAnimationFrame(loop); }; loop();}
$("sure").textContent = "";$("start").hidden = false;$("start").onclick = () => start().catch(e => { $("sure").textContent = "Caméra impossible : " + e.message; $("start").hidden = false; });LICENSEAdded+201
README.mdAdded+46
VIDEOS.mdAdded+29
demo.jsAdded+87
letters.jsonAdded