Skip to main content

04.6.5.1 resnet-50 (preview)

Node Description

resnet-50 (preview) - action type node needed to classify the provided images and recognize objects in them.

note

Model ID@cf/microsoft/resnet-50. A 50-layer CNN with deep image classification trained on over 1 million images from ImageNet.

Image classification using CNN (Convolutional Neural Network) is a process where AI learns to recognize and categorize images into specific categories or classes. For example, if we have many images with cats and dogs, CNN can learn to distinguish cats from dogs based on their unique features such as ear shape, size, and color.

AI: Image Classification is a powerful computer vision tool with a wide range of applications in many fields. Here are some of the uses:

  1. Object Recognition - image classification allows you to automatically determine which objects are present in an image (e.g., a car, a human face, a plant, etc.).
  1. Autonomous Vehicles - image classification is needed to recognize road signs, pedestrians, other vehicles and objects to ensure the safety of self-driving cars.
  1. Image segmentation - classification can be used to highlight image regions belonging to specific objects or categories.
  1. Image search and organization - classification helps to automatically tag and organize large image databases into categories.
  1. Satellite/aerial image processing - image analysis is used for mapping, environmental monitoring, etc.
  1. Inspection - classification models are used for automated inspection of product quality in manufacturing or other areas.

Node Configuration

To configure the resnet-50 (preview) node, the required Image field is required.

Image

Field for entering image file content in the format 1.body.files.[0].content.

caution

Content is one of the output parameters of nodes that work with files. A file can also be transferred to the Trigger on Webhook node address.

Example of launching a node

To obtain image classification, we add two nodes to the scenario:

  1. Trigger on Webhook node for running the scenario and transferring the file to the scenario;
  1. The resnet-50 (preview) node for processing image content.

The output of the scenario is JSON:

  • labeled, e.g., "EGYPTIAN CAT" the class to which the model attributes the image;
  • with scores, e.g., 0.786789059638977 the probability or confidence of the model that the given image really belongs to the class "EGYPTIAN CAT". The higher the score, the higher the model's confidence in the processing result;
  • with the action execution status "success": true.
JSON
{
"result": {
"errors": [],
"messages": [],
"result": [
{
"label": "EGYPTIAN CAT",
"score": 0.786789059638977
},
{
"label": "TIGER CAT",
"score": 0.046069610863924026
},
{
"label": "TABBY",
"score": 0.044507645070552826
},
{
"label": "MADAGASCAR CAT",
"score": 0.024746309965848923
},
{
"label": "TUB",
"score": 0.01639210246503353
}
],
"success": true
}
}