https://github.com/ely-s/efficientdetjs
Port of the EfficientDet neural network architecture to the web.
https://github.com/ely-s/efficientdetjs
ai cv tensorflow
Last synced: about 1 year ago
JSON representation
Port of the EfficientDet neural network architecture to the web.
- Host: GitHub
- URL: https://github.com/ely-s/efficientdetjs
- Owner: Ely-S
- Created: 2020-01-03T20:52:11.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T16:11:25.000Z (over 3 years ago)
- Last Synced: 2025-04-13T14:13:11.415Z (about 1 year ago)
- Topics: ai, cv, tensorflow
- Language: TypeScript
- Homepage: https://ondaka.github.io/EfficientDetJS/index.html
- Size: 123 MB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 26
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### EfficientDetJs
This library lets you easily deploy a State-of-the-Art EfficientDet model to a tensorflow.js runtime. EfficientDet is a fast, very powerful neural architecture with an active open source [implementation](https://github.com/google/automl) making it a good base for new projects. This library allows you to use a pretrained or custom EfficientDet model without messing with tensorflow.js yourself.
[See a live demo](https://ondaka.github.io/EfficientDetJS/example/dist/).
## Getting Started
import EfficientDet from "EfficientDetJS"
const model = new EfficientDet()
// load the model from tf hub
await model.load()
// get an array of object bounding boxes
// .predict accepts a a Tensor3D of an image.
const predictions = model.predict(image)
// draw boxes on canvas
model.draw(predictions, document.getElementById("mycanvas))
### Pretrained checkpoint
The pretraiend checkpoint, efficientdet-d0 is trained on a 90 class COCO challange. It is hosted here on tensorflow hub
### Custom checkpoints
For custom efficientdet models, refer to the Dockerfile for details on how to export your own model from EfficientDet
### Building the typescript
yarn build
#### Building the model
There is a Dockerfile in hub/ that will build an image containing an EfficientDet model and convert it to the tensorflow.js format
cd hub
docker build -t efficientdet-model-d0 .
# Or to build a different moodel size
# docker build --build-arg SIZE=d1 -t efficientdet-model-d0 .
# Copy exported model files into current directory
docker run -v (pwd):/out efficientdet-model-d0 cp -r /tmp/efficientdet-d0.js /out/