Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rosesonfire/objectdetection
Detect single objects in small, background-blurred and close-focused images
https://github.com/rosesonfire/objectdetection
api blurred-background close-focused image-editting image-processing nodejs object-detection
Last synced: 15 days ago
JSON representation
Detect single objects in small, background-blurred and close-focused images
- Host: GitHub
- URL: https://github.com/rosesonfire/objectdetection
- Owner: rosesonfire
- License: mit
- Created: 2017-11-19T09:27:36.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-22T14:10:03.000Z (about 7 years ago)
- Last Synced: 2024-11-28T12:07:28.736Z (24 days ago)
- Topics: api, blurred-background, close-focused, image-editting, image-processing, nodejs, object-detection
- Language: JavaScript
- Homepage:
- Size: 668 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Detect single objects in small, background-blurred and close-focused images.
NPM link: [object-detection](https://www.npmjs.com/package/object-detection)
# Installation
`npm install object-detection`
# Usage
```var detectObject = require('object-detection')
// Tweak the Sensitivity and the Tolerance for optimal result
var config = {
imageName: 'path-to-image', // preferrably in JPG format and less than 100 kB
sensitivity: 50, // ranges from 1 to 100
tolerance: 50, // ranges from 1 to 100
}detectObject(config).then(function(response) {
var base64Img = response.base64Img
// use base64Img in html image tag ...
imageElement.setAttribute('src', 'data:image/jpeg;base64,' + base64Img)// save base64Img as image file ...
fs.writeFile('object.jpg', base64Img, { encoding: 'base64' }, function() {
console.log('Saved object image')
})
})```
# Caution
- Use small images, preferably in JPG format and less than 100 kB
- Currently works for single object.
- Behaviour is not strongly defined for multi-objects.
- Contiguous objects are considered as single object.
- Optimizer is not well tuned yet.
# Web console
[object-detection-console](https://github.com/rosesonfire/objectDetectionConsole) is a simple web console for the object-detection package.
# Examples
Name|Image|Object|Sensitivity|Tolerance
-|-|-|-|-
Baseball|||87|50
Birb|||94|57
Cherry|||86|21
Mic|||87|20
Sunflower|||94|22
Flower|||80|17