Thumbnail article
Image Analytics with Orange Python

Orange is an application developed to visually process data without prior programming experience. Orange uses a widget system to perform data mining. Each widget has its own function and can accept input or output.

How to install Orange Data Mining is quite easy, the installer can be downloaded for free at, or via the Anaconda Navigator dashboard.


To use the Image Analytics widget, we need to install it first. The installation method is to click Options, select Add-Ons, check the Image Analytics box, then click Install.

Import Image

The first step is to import images using the Import Images widget. Select the folder location of the images to be analyzed.

Image Viewer

We can also preview the imported image by using the Image Viewer widget.

Image Embedding

The next process is to create features from the images that are loaded into the process flow. Here we are using the Image Embedding widget. In the Image Embedder available on Orange, there are already several choices of models commonly used in convolutional layers, such as Inception v3, VGG-16 and so on. The use of these models can guarantee a high level of accuracy for the classifier model to be used.

k-Means Clustering

The clustering process carried out here uses the k-Means clustering widget. The reason is because in the Hierarchical Clustering Orange widget there is no cluster label that we can use for further processes such as making classifications. Here, the number of clusters used is 6 (according to the number of labels used).

Classification Model

After clustering, select the column that will be the target in the image analysis process. Here, the target we use is the category column.

Determine the percentage of data split that will be used for train data and test data. The percentage of split data used is 70:30, which 70% is used as train data and 30% is used as test data.

After splitting the data, connect the Data Sampler with the Data Table. Change the links that were from Sample Data to Data changed to Remaining Data to Data.

Orange has supported the implementation of Deep Learning. From the beginning we have used Image Embedding which is commonly used in Convolutional Layers. Then we can also use the fully connected layer Neural Network to perform classification. In this model, 3 hidden layers are used (100, 200, 300), the activation used is ReLu activation, the optimizer used is Adam, learning rate = 0.0001, and epoch = 100.

Test Results

The test results can be seen in the use of the Test & Score and Confusion Matrix widgets. The following are the test results of the model, which obtained an accuracy of 0.932.

From the image analysis, it produces a confusion matrix as follows:

From these results, the following accuracy can be calculated:
Accuracy = TP/Amount of Data

Accuracy = (464 + 530 + 496  + 517 + 487 + 544)/(527 + 570 + 540 + 530 + 523 + 570)

Accuracy = 3038/3260

Accuracy = 0.932

Save Model

To save the model, you can use the Save Model widget and then click the Save as button.

Testing New Image

We can test the new image by importing the image and then loading the image folder to be tested.

After importing, the next step is image embedding. The Embedder used is adjusted to the embedder during the training process.

The next process is load the saved model using the Load Model widget.

Connect the Image Embedding and Load Model widgets with the Predictions widget to get predictive results. Here are the predicted results from testing the new image:

The following is the flow of the image analysis process carried out:

Dataset Links:

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *