Skip to content

Commit

Permalink
Merge pull request #17 from Dialdroid/main
Browse files Browse the repository at this point in the history
Added oscar_plants_classification modul
  • Loading branch information
amcaar authored Jan 17, 2024
2 parents 33fdc6e + bcf7ea1 commit 461e058
Show file tree
Hide file tree
Showing 47 changed files with 489 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
27 changes: 27 additions & 0 deletions node-red/modules/oscar_plants_classification/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Classify plant images among 10K species from the iNaturalist dataset.

```npm install red-contrib-oscar-plants```

# About Plants

Classify plant images among 10K species from the iNaturalist dataset.

[Plants species classifier](https://marketplace.deep-hybrid-datacloud.eu/modules/deep-oc-plants-classification-tf.html)

# About Plants Service in OSCAR

This example uses the pre-trained classification model by DEEP-Hybrid-DataCloud Plants species classifier and is prepared to be used with synchronous invocations.

For more information consult:

[Plants Service](https://github.com/grycap/oscar/tree/master/examples/plant-classification-sync)

## Inputs

The input variables will be the basic variables (OSCAR server url and credentials). In addition to the name that has been given to the plants service on the server. Inside the input msg.payload must be the text to write. With all these elements, the service token is searched and then a request is made to the service ( POST /run/{serviceName}).

```Syns```

## Outputs

The node returns through msg.payload plant classification image using Lasagne/Theano (base64), which can be used in image display nodes such as images preview node. GRyCAP (Grupo de Grid y Computación de Altas Prestaciones) - UPV
9 changes: 9 additions & 0 deletions node-red/modules/oscar_plants_classification/oscar_plants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const fs = require("fs");
const path = require("path");

module.exports = function(RED) {
const subflowFile = path.join(__dirname,"subflow.json");
const subflowContents = fs.readFileSync(subflowFile);
const subflowJSON = JSON.parse(subflowContents);
RED.nodes.registerSubflow(subflowJSON);
}
32 changes: 32 additions & 0 deletions node-red/modules/oscar_plants_classification/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "node-red-contrib-oscar-plants-classification",
"version": "0.0.6",
"description": "Classify plant images among 10K species from the iNaturalist dataset.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ai4os/ai4-compose.git"
},
"keywords": [
"node-red",
"OSCAR",
"plants",
"GRyCAP",
"UPV",
"AI4EOSC"
],
"author": "GRyCAP - UPV",
"license": "ISC",
"bugs": {
"url": "https://github.com/ai4os/ai4-compose/issues"
},
"homepage": "https://github.com/ai4os/ai4-compose/tree/main/node-red/modules",
"node-red": {
"nodes": {
"oscar-plants-node": "oscar_plants.js"
}
}
}
Loading

0 comments on commit 461e058

Please sign in to comment.