Skip to content

Commit dc407a1

Browse files
committed
Replace 'single shot' with 'single frame'
To avoid confusion since single-shot inference has a different meaning in machine learning
1 parent a93f055 commit dc407a1

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/reference/depthestimation.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ Get up and running with the [webcam example](https://editor.p5js.org/ml5/sketche
1414
## Examples
1515
- [Webcam](https://editor.p5js.org/ml5/sketches/1AlSdDhwA): Show the live depth map of the video captured by the webcam.
1616
- [Video](https://editor.p5js.org/ml5/sketches/YGAqvhn1o): Generate the depth map of a video file as it plays.
17-
- [Single Image](https://editor.p5js.org/ml5/sketches/VpVUFgtOU): Depth map of an image using single-shot estimation.
17+
- [Single Image](https://editor.p5js.org/ml5/sketches/VpVUFgtOU): Depth map of an image using single frame estimation.
1818
- [Mask Background](https://editor.p5js.org/ml5/sketches/zxi8xUuq4): Showcases how to mask out the background from the depth result.
1919
- [Point Cloud](https://editor.p5js.org/ml5/sketches/7EOC8txJ1): Creates a live 3D point cloud visualization of the webcam video.
2020
- [Mesh](https://editor.p5js.org/ml5/sketches/CE2f9l38k): Creates a live 3D mesh geometry of the webcam video.
2121

2222
## Step-by-Step Guide
23-
### Initialization and options
23+
### Initialization and Options
2424
Before starting, make sure you have included the ml5 library in your `index.html` file:
2525

2626
```html
@@ -52,12 +52,12 @@ async function setup() {
5252
}
5353
```
5454

55-
### Estimating depth
56-
As with many other ml5 models, you have two options to run depth estimation on the image, video or webcam of your choice: _Continuous Estimation_ and _Single Shot Estimation_ .
55+
### Estimating Depth
56+
As with many other ml5 models, you have two options to run depth estimation on the image, video or webcam of your choice: _Continuous Estimation_ and _Single Frame Estimation_ .
5757

5858
For any of these, make sure you first load the image, video or start the webcam capture. This is the media we will pass to the model.
5959

60-
#### Continuous estimation
60+
#### Continuous Estimation
6161
This method is used to continuously estimate depth on every frame of a video or webcam feed.
6262
```js
6363
// Make sure to load the model in preload or async in p5 2.0!
@@ -75,7 +75,7 @@ function gotResults(result) {
7575
```
7676
Using this method, the depth estimator will take care of doing estimation of a frame and waiting for it to finish before working on the next frame. Any time a depth map is ready, it will fire the callback function to provide it.
7777

78-
#### Single shot estimation
78+
#### Single Frame Estimation
7979
This method is used to estimate depth once, for a single image:
8080
```js
8181
// Make sure to load the image and the model in preload or asyn in p5 2.0!
@@ -90,7 +90,7 @@ function gotResults(result) {
9090
```
9191
Because the estimation takes time, we pass in a callback function that will fire when estimation is ready. The `estimate` method is called in setup because it **will only run once**. If calling it multiple times, it is prudent to wait for each operation to finish before starting the next one.
9292

93-
### Using the depth result
93+
### Using the Depth Result
9494
Whenever the callback function fires, we have acces to the depth result that contains all the depth information.
9595
```js
9696
let depthMap;
@@ -171,7 +171,7 @@ depthEstimator.estimateStop()
171171
```
172172
173173
### depthEstimator.estimate()
174-
This method is used for _Single Shot Estimation_: estimating depth one time on a single image or video/webcam frame.
174+
This method is used for _Single Frame Estimation_: estimating depth one time on a single image or video/webcam frame.
175175
176176
```js
177177
depthEstimator.estimate(media, callback)

0 commit comments

Comments
 (0)