Skip to content
This repository was archived by the owner on Jul 1, 2024. It is now read-only.

Commit 1009a07

Browse files
Update README.md
1 parent 8d3474a commit 1009a07

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

README.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -79,26 +79,6 @@ You can download pre-trained weights and configuration from pjreddie's website.
7979

8080
If you don't want to download that stuff manually, navigate to the `examples` directory and issue the `./example` command. This will download the necessary files and run some detections.
8181

82-
### Async
83-
By default, darknet.js will run the detections synchronously. If this isn't your style, you can run detections asynchronously, using the `detectAsync` method.
84-
```typescript
85-
darknet.detectAsync('/image/of/a/dog.jpg')
86-
.then(detections => console.log(detections));
87-
```
88-
At this time, async detections cannot be run in parallel and attempting to will cause your detections to be incorrect. The `DarknetExperimental` class has serial async. It is intended to eventually replace the original `Darknet` class:
89-
```typescript
90-
import { DarknetExperimental } from 'darknet';
91-
92-
const darknet = new DarknetExperimental(config);
93-
94-
darknet.detectAsync('/image/of/a/dog.jpg')
95-
.then(detections => console.log(detections));
96-
97-
darknet.detectAsync('/image/of/a/cat.jpg')
98-
.then(detections => console.log(detections));
99-
100-
darknet.detectAsync('/image/of/an/eagle.jpg')
101-
.then(detections => console.log(detections));
10282
```
10383
## Built-With
10484
- [Node FFI](https://github.com/node-ffi/node-ffi)

0 commit comments

Comments
 (0)