Skip to content

Commit 3a38d05

Browse files
authored
Merge pull request #613 from asukaminato0721/fix-broken-link
fix links in speak-with-your-hands.mdx
2 parents 9b17a9e + 46e4507 commit 3a38d05

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

Diff for: src/content/tutorials/en/speak-with-your-hands.mdx

+24-24
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@ You Will Need:
3939

4040
In past tutorials with interactivity, we learned how to use tools like the mouse and keyboard (physical objects) to interact with the computer. These tools have helped us talk with computers for many years. But now, we don't always need them. In this tutorial, we're going to learn how to control our p5.js drawings directly with our hands, like a magician waving her wand!
4141

42-
To do this, we will use the [ml5.js library](https://ml5js.org/) and a *machine learning model* called [HandPose](https://learn.ml5js.org/#/reference/handpose?id=handpose). The ml5.js HandPose model figures out the positions of your hand on the computer screen. 
42+
To do this, we will use the [ml5.js library](https://ml5js.org/) and a *machine learning model* called [HandPose](https://docs.ml5js.org/#/reference/handpose). The ml5.js HandPose model figures out the positions of your hand on the computer screen. 
4343

4444
*Machine learning* is like teaching a computer to learn and make choices by showing it lots of examples. The code looks at the examples and creates connections, kind of like how we learn. If we want to teach it to know the difference between cats and dogs, we show it lots of pictures and tell it which ones are cats and which ones are dogs. The more examples you show the machine learning model, the better it gets. You could then show it a new picture, and it would be able to tell if it's a cat or a dog. That's machine learning in action. For more examples of machine learning, watch [this video](https://www.youtube.com/watch?v=5q87K1WaoFI\&t=665s) on Youtube.
4545

46-
The [ml5.js](https://ml5js.org/) [HandPose](https://learn.ml5js.org/#/reference/handpose?id=handpose) machine learning model can recognize a hand in a picture and identify points on each finger. When we create interactive sketches with the mouse, we extract a mouse cursor position and use built-in variables like `mouseX` and `mouseY` to control things on the screen. The ml5.js lets us do something similar, but with your hand movements via a webcam.
46+
The [ml5.js](https://ml5js.org/) [HandPose](https://docs.ml5js.org/#/reference/handpose) machine learning model can recognize a hand in a picture and identify points on each finger. When we create interactive sketches with the mouse, we extract a mouse cursor position and use built-in variables like `mouseX` and `mouseY` to control things on the screen. The ml5.js lets us do something similar, but with your hand movements via a webcam.
4747

4848

4949
### Step 1 - Set up ml5.js
5050

51-
- Open the [ml5.js HandPose Image](https://editor.p5js.org/ml5/sketches/Handpose_Image) example in the p5.js Web Editor. Make a copy and name it something like "Handpose Sketch".
51+
- Open the [ml5.js HandPose Image](https://editor.p5js.org/AsukaMinato/sketches/KI4OqvacU) example in the p5.js Web Editor. Make a copy and name it something like "Handpose Sketch".
5252

5353
![The ml5.js Handpose\_Image code running in the p5.js Web Editor. An image of a hand is shown on the canvas with green dots on various points along each finger and palm. The text Handpose with single image is displayed above the canvas.](../images/advanced/handpose-web-editor.png)
5454

@@ -113,7 +113,7 @@ function drawKeypoints() {
113113

114114
![The palm of a hand with 4 fingers in green color that identify each finger, and 5 green points identifying the thumb and the bottom of the palm.](../images/advanced/handpose_image.jpg)
115115

116-
[Live](https://editor.p5js.org/vyasakanksha/sketches/I0TNZ9w_1)
116+
[Live](https://editor.p5js.org/AsukaMinato/sketches/lmpV7LuOu)
117117

118118
</Column>
119119
</Columns>
@@ -122,9 +122,9 @@ function drawKeypoints() {
122122

123123
#### Deep Dive into ml5.js Sample Code
124124

125-
Let's dive into how [ml5.js](https://ml5js.org/) works, especially with the [HandPose](https://learn.ml5js.org/#/reference/handpose?id=handpose) model. [ml5.js](https://ml5js.org/) is a tool made to help us all use machine learning easily. It works great with p5.js, which means our computer can "see, hear, and understand" stuff using a camera, just like we do!
125+
Let's dive into how [ml5.js](https://ml5js.org/) works, especially with the [HandPose](https://docs.ml5js.org/#/reference/handpose) model. [ml5.js](https://ml5js.org/) is a tool made to help us all use machine learning easily. It works great with p5.js, which means our computer can "see, hear, and understand" stuff using a camera, just like we do!
126126

127-
The [HandPose](https://learn.ml5js.org/#/reference/handpose) model uses image recognition algorithms to recognize your hand. It can spot your palm and fingers and keep track of them as you move your hand around in front of the camera. It can only detect one one hand at a time, but it can identify 21 different key-points on the hand in 3D space. This means that it gives us the x-y-z coordinates of each point. These key-points show us key parts of your palm and fingers. 
127+
The [HandPose](https://docs.ml5js.org/#/reference/handpose) model uses image recognition algorithms to recognize your hand. It can spot your palm and fingers and keep track of them as you move your hand around in front of the camera. It can only detect one one hand at a time, but it can identify 21 different key-points on the hand in 3D space. This means that it gives us the x-y-z coordinates of each point. These key-points show us key parts of your palm and fingers. 
128128

129129
Now let’s start with the static image to see this in action.
130130

@@ -224,7 +224,7 @@ function drawKeypoints() {
224224

225225
![The palm of a hand with 4 fingers in green color that identify each finger, and 5 green points identifying the thumb and the bottom of the palm.](../images/advanced/handpose_image.jpg)
226226

227-
[Live](https://editor.p5js.org/vyasakanksha/sketches/jsco7Hu4T)
227+
[Live](https://editor.p5js.org/AsukaMinato/sketches/PrTg6fOe3)
228228

229229
</Column>
230230
</Columns>
@@ -323,7 +323,7 @@ function drawKeypoints() {
323323

324324
![A hand with the tip of each finger and thumb identified with a different coloured dot.](../images/advanced/ml5-hand-multicolor.png)
325325

326-
[Live](https://editor.p5js.org/vyasakanksha/sketches/JmQqw7sZV)
326+
[Live](https://editor.p5js.org/AsukaMinato/sketches/3EyR46WiN)
327327

328328
</Column>
329329
</Columns>
@@ -443,22 +443,22 @@ function drawKeypoints() {
443443
444444
![A hand where the tip of each finger and thumb has a joker's hat on it](../images/advanced/ml5-hand-hats.png)
445445
446-
[Live](https://editor.p5js.org/vyasakanksha/sketches/UCskWrEkW)
446+
[Live](https://editor.p5js.org/AsukaMinato/sketches/W6V8cSNIo)
447447
448448
</Column>
449449
</Columns>
450450
451-
Lets understand the code in this example:
451+
Let's understand the code in this example:
452452
453453
- First, upload a small .png file (100x100 pixels max) that has a transparent background. We create a new variable to store this image and then load it in the preload function. 
454454
- Next, we place the image at the same location as each ellipse in the previous code example. 
455-
- Next, we adjust the points to center the image at each fingertip point. The image will render so that  the fingertip point is the left bottom corner of the hat image, representing the (0,0) point. To center the hat image on that point, we subtract half the width of the image from the x-coordinate of the fingertip point and subtract half the height of the image from the y-coordinate of the fingertip point. 
455+
- Next, we adjust the points to center the image at each fingertip point. The image will render so that the fingertip point is the left bottom corner of the hat image, representing the (0,0) point. To center the hat image on that point, we subtract half the width of the image from the x-coordinate of the fingertip point and subtract half the height of the image from the y-coordinate of the fingertip point. 
456456
- Finally, we render the hatImage instead of drawing the ellipses at the end of the `drawKeypoints()` function.
457457
458458
459459
#### Example: Using a live Webcam feed
460460
461-
In this example we replace the static image with a live webcam feed. 
461+
In this example, we replace the static image with a live webcam feed. 
462462
463463
Let’s go back to the ml5.js Handpose, and open up the [Webcam reference for p5.js web editor](https://editor.p5js.org/ml5/sketches/Handpose_Webcam). Make a copy and name it something like “Handpose Webcam Sketch”. 
464464
@@ -510,7 +510,7 @@ function drawKeypoints() {
510510
511511
![A video feed of a hand up in the air with green dots on each finger](../images/advanced/ml5-pose-webcam.gif)
512512
513-
[Live](https://editor.p5js.org/vyasakanksha/sketches/_h4n2eFvE)
513+
[Live](https://editor.p5js.org/AsukaMinato/sketches/sccc0y2hx)
514514
515515
</Column>
516516
</Columns>
@@ -617,7 +617,7 @@ function drawKeypoints() {
617617
618618
![A hand moving around the screen where the tip of each finger and thumb has a joker's hat on it and the hats move with the hand.](../images/advanced/ml5-webcam-hats.gif)
619619
620-
[Live](https://editor.p5js.org/vyasakanksha/sketches/4-E2ThsHY)
620+
[Live](https://editor.p5js.org/AsukaMinato/sketches/10yJDZmH0)
621621
622622
</Column>
623623
@@ -630,14 +630,14 @@ Give each finger a different hat!
630630
631631
### Step 3 -  Adding interactivity 
632632
633-
Now that we understand the data that the ml5.js HandPose model provides to us, we can use it to interact with our sketches. There are some fun examples of interacting with sketches in the [Conditionals and Interactivity](/tutorials/conditionals-and-interactivity) tutorial. Let’s start with some of these examples - but use our hands instead of the mouse.
633+
Now that we understand the data that the ml5.js HandPose model provides to us, we can use it to interact with our sketches. There are some fun examples of interacting with sketches in the [Conditionals and Interactivity](https://p5js.org/tutorials/conditionals-and-interactivity/) tutorial. Let’s start with some of these examples - but use our hands instead of the mouse.
634634
635635
When we interacted with our sketches using the mouse, we used the `mouseX` and `mouseY` variables to track the x-y coordinates of the cursor. Now, we will use the x-y coordinates of the tip of a finger. 
636636
637637
638638
#### Example: Move a ball with your index finger
639639
640-
In this example we control a circle on the screen with our index finger. 
640+
In this example, we control a circle on the screen with our index finger. 
641641
642642
Let’s start with the “Using a live Webcam feed” example. 
643643
@@ -709,7 +709,7 @@ function drawObject() {
709709
710710
![Video of fingers (one or many) moving around the screen, with a white dot on the tip of the index finger only](../images/advanced/ml5js-webcam-ballcontrol.gif)
711711
712-
[Live](https://editor.p5js.org/vyasakanksha/sketches/xJkXVoQQs)
712+
[Live](https://editor.p5js.org/AsukaMinato/sketches/OQyXTAPhG)
713713
714714
</Column>
715715
</Columns>
@@ -762,7 +762,7 @@ function drawObject() {
762762
763763
![A webcam feed of a hand in the air with three white circles on the three central fingers of the hand](../images/advanced/ml5-webcam-multiple.gif)
764764
765-
[Live](https://editor.p5js.org/vyasakanksha/sketches/tbB8BR-7c)
765+
[Live](https://editor.p5js.org/AsukaMinato/sketches/ZBAlPcqsT)
766766
767767
</Column>
768768
</Columns>
@@ -822,7 +822,7 @@ function drawObject() {
822822
823823
![A finger pointing to the right or left with a gray rectangle covering half the screen where the finger is pointing ](../images/advanced/mljs-move-object.gif)
824824
825-
[Live](https://editor.p5js.org/vyasakanksha/sketches/kfseWyYR4)
825+
[Live](https://editor.p5js.org/AsukaMinato/sketches/fi1MJKxK1)
826826
827827
</Column>
828828
@@ -907,7 +907,7 @@ function drawObject() {
907907
908908
![A gray box in the middle of the screen and a small gray dot moving near the box. The box turns yellow when the dot is within the box.](../images/advanced/mljs-handpose-colour.gif)
909909
910-
[Live](https://editor.p5js.org/vyasakanksha/sketches/7BBJPBCyI)
910+
[Live](https://editor.p5js.org/AsukaMinato/sketches/fbPQpLvfb)
911911
912912
</Column>
913913
@@ -1039,7 +1039,7 @@ function drawObject() {
10391039
10401040
Sketch by [Akif Kazi](https://www.instagram.com/designer_akifkazi), Student at KJ Somaiya University, Mumbai.
10411041
1042-
[Live](https://editor.p5js.org/vyasakanksha/sketches/tqvxO53fn)
1042+
[Live](https://editor.p5js.org/AsukaMinato/sketches/a8dEKOBPK)
10431043
10441044
</Column>
10451045
</Columns>
@@ -1054,7 +1054,7 @@ Sketch by [Akif Kazi](https://www.instagram.com/designer_akifkazi), Student at K
10541054
10551055
### Next Steps
10561056
1057-
Explore the [PoseNet](https://learn.ml5js.org/#/reference/posenet) and [Facemesh](https://learn.ml5js.org/#/reference/facemesh) models in the ml5.js library. The PoseNet model detects points on the whole body, in the exact same way that HandPose detects it for the hand. The Facemesh model returns points on the face. You should understand the data that these models return and use them in your sketches. 
1057+
Explore the [PoseNet](https://archive-docs.ml5js.org/#/reference/posenet) and [Facemesh](https://docs.ml5js.org/#/reference/facemesh) models in the ml5.js library. The PoseNet model detects points on the whole body, in the exact same way that HandPose detects it for the hand. The Facemesh model returns points on the face. You should understand the data that these models return and use them in your sketches. 
10581058
10591059
<Callout>
10601060
@@ -1068,6 +1068,6 @@ Using the Facemesh model, create the following:
10681068
### Resources
10691069
10701070
- [ml5.js library](https://ml5js.org/)
1071-
- [ml5.js Handpose Examples](https://learn.ml5js.org/#/reference/handpose?id=examples)
1071+
- [ml5.js Handpose Examples](https://docs.ml5js.org/#/reference/handpose?id=examples)
10721072
- [Computer Scientist Explains ML in 5 Levels](https://www.youtube.com/watch?v=5q87K1WaoFI\&t=665s)
1073-
- [Conditionals and Interactivity in p5.js](/tutorials/conditionals-and-interactivity/)
1073+
- [Conditionals and Interactivity in p5.js](https://p5js.org/tutorials/conditionals-and-interactivity/)

0 commit comments

Comments
 (0)