Skip to content

Commit

Permalink
add license, update readme and package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
nonodev96 committed Jun 14, 2024
1 parent 36fce0f commit acf6ba8
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/src
/node_modules
.git

.env
.DS_Store
Expand Down
11 changes: 11 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
BSD-2-Clause (BSD-2)

Copyright (c) 2024 Antonio Mudarra Machuca (nonodev96@gmail.com)

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
48 changes: 46 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,44 @@
- [ ] Isolated languages
- No data

## Example

```js
import * as handsignMultiligual from 'handsign-multilingual'
import * as handPoseDetection from '@tensorflow-models/hand-pose-detection'

// INIT
const { HandSignsSSL } = handsignMultiligual
const signs = Object.values(HandSignsSSL.signs)
const _GE = new fp.GestureEstimator([
...signs
])
const model = handPoseDetection.SupportedModels.MediaPipeHands
const detectorConfig = {
runtime : 'mediapipe', // or 'tfjs',
solutionPath: 'https://cdn.jsdelivr.net/npm/@mediapipe/hands',
modelType : 'full'
}
const _modelDetector = await handPoseDetection.createDetector(model, detectorConfig)

// PREDICTIONS
const predictions_hands = await _modelDetector.estimateHands(input)

// Render
const font = '16px Roboto'
predictions.forEach((hand) => {
const landmark = hand.keypoints.map(({x,y,z})=>[x,y,z])
_drawFinger(ctx, landmark)
const landmark3D = hand.keypoints3D.map(({x,y,z})=>[x,y,z])
const estimatedGestures = _GE.estimate(landmark3D, 8.5)
console.log({ estimatedGestures })

const {x, y} = hand.keypoints[0]
const letters = estimatedGestures.gestures.map(({name})=> name)
_drawTextBG(ctx, `${letters}`, font, x, y, 16)
})
```

---

## American Sign Language (ASL)
Expand All @@ -34,7 +72,10 @@


```js
import { HandSingASL } from "handsign-multilingual"
import { HandSignsASL } from "handsign-multilingual"

const { signs } = HandSignsASL
const signs_array = Object.values(signs)

```

Expand All @@ -43,7 +84,10 @@ import { HandSingASL } from "handsign-multilingual"
![Spanish Sign Language (SSL)](.github/SSL.png)

```js
import { HandSingSSL } from "handsign-multilingual"
import { HandSignsSSL } from "handsign-multilingual"

const { signs } = HandSignsSSL
const signs_array = Object.values(signs)

```

Expand Down
15 changes: 11 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
{
"name": "handsign-multilingual",
"version": "1.0.0",
"description": "handsign multilingual",
"version": "0.2.0",
"description": "handsign multilingual alphabet detection",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"author": "@nonodev96",
"license": "MIT",
"author": {
"name": "Antonio Mudarra Machuca",
"email": "nonodev96@gmail.com",
"url": "https://github.com/nonodev96"
},
"repository": {
"type": "git",
"url": "https://github.com/nonodev96/handsign-multilingual"
},
"scripts": {
"build": "tsup ",
"lint": "npx @biomejs/biome lint src",
Expand Down

0 comments on commit acf6ba8

Please sign in to comment.