Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
In-Browser Object Detection using Tiny YOLO on Tensorflow.js
| Date | Stars |
|---|---|
| 2026-07-24 | 533 |
| 2026-07-25 | 533 |
| 2026-07-28 | 533 |
| 2026-07-30 | 533 |
| 2026-08-06 | 533 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
<a href='https://modeldepot.io/mikeshi/tiny-yolo-in-javascript'> <img src='https://img.shields.io/badge/ModelDepot-Pre--trained_Model-3d9aff.svg'/> </a>
# ⚡️ Fast In-Browser Object Detection 👀
Detect objects in images right in your browser using [Tensorflow.js](https://js.tensorflow.org/)! Currently takes ~800ms
to analyze each frame on Chrome MBP 13" mid-2014.
Supports [`Tiny YOLO`](https://pjreddie.com/darknet/yolo/), as of right now,
[`tfjs`](https://github.com/tensorflow/tfjs) does not have
support to run any full YOLO models (and your user's computers probably
can't handle it either).
## Demo
[Check out the Live Demo](https://modeldepot.github.io/tfjs-yolo-tiny-demo/)
(You can only get so far with 1 FPS)

## Install
### Yarn
yarn add tfjs-yolo-tiny
### Or NPM
npm install tfjs-yolo-tiny
## Usage Example
```javascript
import yolo, { downloadModel } from 'tfjs-yolo-tiny';
const model = await downloadModel();
const inputImage = webcam.capture();
const boxes = await yolo(inputImage, model);
// Display detected boxes
boxes.forEach(box => {
const {
top, left, bottom, right, classProb, className,
} = box;
drawRect(left, top, right-left, bottom-top, `${className} ${classProb}`)
});
```
## API Docs
### yolo(input, model, options)
#### Args
Param | Type | Default | Description
-- | -- | -- | --
input | tf.Tensor | - | Expected shape (1, 416, 416, 3) Tensor representing input image (RGB 416x416)
model | tf.Model | - | Tiny YOLO tf.Model
[options] | Object | See Below | Optional, Additional Configs
If you're using a custom Tiny YOLO model or want to adjust the default
filtering cutoffs, you may do so by passing an additional options
object.
Example: `yolo(inputImage, model, { classProbThreshold: 0.8 });`
Option | Type | Default | Description
-- | -- | -- | --
| [options.classProbThreshold] | <code>Number</code> | <code>0.4</code> | Filter out classes below a certain threshold |
| [options.iouThreshold] | <code>Number</code> | <code>0.4</code> | Filter out boxes that have an IoU greater than this threadhold (refer to tf.image.nonMaxSuppression) |
| [options.filterBoxesThreshold] | <code>Number</code> | <code>0.01</code> | Threshold to filter out box confidence * class confidence |
| [options.maxBoxes] | <code>Number</code> | <code>2048</code> | Number of max boxes to return, refer to tf.image.nonMaxSuppression. Note: The model itself can only return so many boxes. |
| [options.yoloAnchors] | <code>tf.Tensor</code> | <code>See src/postprocessing.js</code> | (Advanced) Yolo Anchor Boxes, only needed if retraining on a new dataset |
| [options.width] | <code>Number</code> | <code>416</code> | (Advanced) If your model's input width is not 416, only if you're using a custom model |
| [options.height] | <code>Number</code> | <code>416</code> | (Advanced) If your model's input height is not 416, only if you're using a custom model |
| [options.numClasses] | <code>Number</code> | <code>80</code> | (Advanced) If your model has a different number of classes, only if you're using a custom model |
| [options.classNames] | <code>Array.<String></code> | <code>See src/coco_classes.js</code> | (Advanced) If your model has non-MSCOCO class names, only if you're using a custom model |
#### Returns
Returns an array of objects.
Property | Type | Description
-- | -- | --
top | Number | Pixels from top of image where bounding box starts
left | Number | Pixels from left of image where bounding box starts
bottom | Number | Pixels from top of image where box ends.
right | Number | Pixels from left of image where box ends.
classProb | Number | Probability of the class in the bounding box.
className | String | Human name of the class.
### downloadModel(url)
#### Args
Param | Type | Default | Description
-- | -- | -- | --
url | string | See DEFAULT_MODEL_LOCATION | Tiny YOLO Model config path. See [tf.loadModel](httpsExcerpt of 4,949 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:4914579e82616e32, topic:computer-vision, topic:object-detection, topic:yolo
matched fp:4914579e82616e32, topic:deep-learning, topic:tensorflow