# emotion-recognition-api

> JavaScript API for emotion recognition in the browser

Latest version **0.0.1** (published 2023-04-28) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install emotion-recognition-api
pnpm add emotion-recognition-api
yarn add emotion-recognition-api
bun add emotion-recognition-api
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; large bundle; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2023-04-28 |
| First published | 2023-04-28 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 42.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | inventshah |
| Keywords | recognition, emotion, tensorflow, tf |

## Links

- npm: https://www.npmjs.com/package/emotion-recognition-api
- Repository: https://github.com/inventshah/emotion-recognition-api
- Homepage: https://github.com/inventshah/emotion-recognition-api#readme
- Issues: https://github.com/inventshah/emotion-recognition-api/issues
- npm.io page: https://npm.io/package/emotion-recognition-api

## Dependencies (1)

- [@tensorflow/tfjs](https://npm.io/package/@tensorflow/tfjs.md) >3.4.0

## Recent versions

- 0.0.1 (latest) — 2023-04-28

## README

# emotion-recognition-api

Library for recognizing emotions.

## Usage

### JavaScript

The [example](https://github.com/inventshah/emotion-recognition-api/tree/main/example) shows how to use the API with a camera.

Model weights are in `node_modules/emotion-recognition-api/models`. You should set them as static files on your server.

```js
import { TERGAN } from "emotion-recognition-api";

const model = new TERGAN(urlToModelJson);

const tensor = model.preprocess(imageData, boundingBox);
const emotion = model.run(tensor);
tensor.dispose();
```

## Citation

If you find the TER-GAN model useful in your research, please cite:

```bibtex
@INPROCEEDINGS{Ali:2021:TER,
	author={Ali, Kamran and Hughes, Charles E.},
	booktitle={2020 25th International Conference on Pattern Recognition (ICPR)},
	title={Facial Expression Recognition By Using a Disentangled Identity-Invariant Expression Representation},
	year={2021},
	pages={9460-9467},
	doi={10.1109/ICPR48806.2021.9412172}
}
```

---
_Source: https://npm.io/package/emotion-recognition-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
