In primary school, children start learning about life in different parts of the world through various subjects (geography, history, art etc.). One of the topics covered is culture – closely linked to religions of a particular area. People from different religions visit buildings that look different and have different names. In this lesson, we will explore the typical places of worship for Hinduism, Buddhism, Islam, and Christianity.
Orange workflow is big, but don’t be intimidated: everything is already connected, and here we will carefully explain what to click to get this or that map or picture.
If we want, we can already show the images that the students will classify, and the data associated with them using the computer.
In Orange, we load the prepared workflow. The workflow is set up to read a sample of data from the website, https://pumice.si/en/places-of-worship/resources/rose-garden.xlsx.
Double-click to open the Image Viewer at the top of the workflow. It shows the images of objects that the students will be classifying. We can zoom in on individual images (using the Image Size slider or by selecting the image and pressing the spacebar).
Double-click to open the Map under the Image Viewer. It shows the points where the pictures were taken, with the color corresponding to the type of house.
If we hover the mouse over a specific point, we learn the name of the place. If we click on a specific point, we can see the object image in the Image Viewer that corresponds to that point. We can also select multiple objects at once by drawing a rectangle around them with the mouse.
This part of the lesson can also be used to discuss the characteristics of religious buildings from different parts of the world. We can ask the students about the features they notice, or look for patterns in the location of objects on the map.
We divide the students into groups of (prefferably) five (or four, for the last groups). This makes it easier to organize the data entry later on.
Each group gets a set of cards with pictures of buildings.
Students should sort the cards into four piles: mosque, Buddhist temple, Hindu temple, and Christian church.
Each student (except for the fifth) takes responsibility for one pile. Their first task is to arrange the cards in numerical order, from the lowest to the highest number.
Each group gets a tablet or computer, where we’ve already opened the webpage with the form for entering their object classifications.
Students will first need to enter their group’s name, which they come up with themselves. This is important so that later we can see which group prepared which classification.
Next, the pictures of the objects will appear. The website will show the images, and the group must select the pile they assigned each object to. The best way to do this is for the fifth student to take the tablet and read the object numbers in order. The student whose pile contains the card with that number calls it out. (This is why it’s useful to have five students per group and why the piles must be arranged in numerical order.) Groups of four can organize themselves by placing the tablet in the middle and having the student whose pile contains the object press the answer directly.
Once they’ve entered all their answers, they wait for the other groups to finish.
Open the prepared workflow in Orange.
Double-click to open the File widget and replace the current URL, which reads the test example, with the URL where we get the students’ data. This URL is the same as the form’s webpage, but with /data
added at the end. (For example, if the form students entered data into was at https://data.pumice.si/rose-garden
, the data can be found at https://data.pumice.si/rose-garden/data
.)
Open the Map widget again — the one at the top. If we change the Color field from “Type” to one of the group names, the points on the map will be colored according to that group’s decisions.
We do this for all the groups to see if they made the same mistakes.
If we open the Image Viewer at the same time, we can click on the points on the map and see the corresponding images. This lets us discuss which characteristics students may have overlooked or misunderstood.
We can also observe mistakes using the Pivot Table connected to the File widget. We can set the Column field to different groups.
Now the rows represent the actual types of objects, while the columns show the types predicted by the students.
If we want to see the images of the objects the students misclassified, we open the Image Viewer connected to the Pivot Table.
In the next part of the lesson, we can demonstrate how the computer tackles the task that the students worked on.
Open the Table widget that is connected directly to the File widget. Show its contents: we tell the students that the names of the places and their coordinates, as well as the decisions made by the groups, are marked in a way that the computer will not use them for classification.
The computer can only use the images. For each image, the table contains the URL of the image. The computer will first download them and then convert the images into numbers that will describe their content in some way.
This is done by the Image Embedding widget. Open the Table widget connected to Image Embedding. Show that it has added 2048 columns with numbers that describe the content of the images. We don’t know what each number represents exactly; these numbers are generated by a deep neural network, similar to the large language models that students are familiar with, but this network is designed to process images rather than text.
Open Test and Score. This widget does the following:
In the accuracy column, we can read that it correctly classified 81.2 % of the images; with 48 images, that’s 39 correct predictions and 9 mistakes. Pretty good.
The Confusion Matrix widget shows a similar thing to what the Pivot Table widget showed for the students. The rows represent the actual types of objects, and the columns represent the computer’s predictions.
A map is connected to the Confusion Matrix. A new “group of students” named Logistic Regression has appeared – this is the name of the algorithm the computer used for learning.
If we select a cell in the Confusion Matrix, the objects related to that cell are highlighted on the map. This allows us to see where the houses are that the computer misclassified.
We can also view the images of the objects related to each cell in the Image Viewer connected to the Confusion Matrix.
If the teacher feels confident enough, they can initiate a discussion about the tasks the computer had to perform - and how fascinating it is that it succeeded.
Each image is described by 2048 numbers. This may not seem like much: if these numbers represented the pixels of a photograph, it would only be 2048 points, meaning a black-and-white image of 45 x 45 pixels. In reality, these numbers don’t represent individual points. Instead, in a way that is unreadable to humans, they contain data about what is in the image. From them, the computer can infer whether the image shows a house or a cat, whether there is a tree next to the house — and on which side — and whether the object has a dome, a spire, or a statue of a deity.
In each learning round, the computer had 43 or 44 objects of different types available, meaning about 10 images of each type. From these, it had to learn – just based on these numbers and with so few images! – which numbers are typical for each type of object.
Even we, computer scientists are surprised that this actually work - and that it works so well.