# Multi-class Classification of Animals in Camera-trap Photos

*English translation by SOTA – AI Community of the Russian original. Organisers who would like this translation removed can email sota.ai.community@gmail.com.*

*Source: the 2024/25 task collection of the National Technology Olympiad (NTO), "Artificial Intelligence" profile, Stage 1, pp. 99–101: [original PDF](https://ntcontest.ru/upload/sborn2025/%D0%98%D0%98.pdf#page=99).*

## 2.4. Engineering tour

The aim of the task is to test the participants' skills in working with classification algorithms in order to create a model capable of automatically classifying the group of animals in camera-trap photos. It tests their competence in data processing and in applying machine learning algorithms, as well as their ability to immerse themselves in the subject area and to apply computer vision algorithms in their solution.

The task helps to assess participants on their knowledge and skills in programming, zoology, image processing, machine learning and the application of technical solutions to real-world problems.

### Task 2.4.1. Multi-class Classification of Animals in Camera-trap Photos (100 points)

*Topics: programming, data exploration, machine learning, computer vision.*

#### Problem statement

The task is devoted to classifying animals into broad groups. For this, participants receive access to unique data: images from camera traps provided by partner research organisations. Solving the task will reduce the workload on scientists associated with recognising species and, consequently, make population monitoring more efficient.

Why is this important?

Monitoring wild animal populations is an important task for the worldwide community of wildlife researchers. It helps to find out which animal species are endangered, how they behave in different periods of their lives, where they live, and much more.

Various tools are used to monitor animals, including camera traps: special cameras that are installed in the forest and react to movement in the frame. Every year these cameras deliver hundreds of thousands of photographs, in which the animals have to be found and categorised. This is very difficult and painstaking work, because among the species, whose total number can reach several hundred, there may be some that are visually hard to tell apart. In addition, only part of an animal may be in the frame at the moment the camera is triggered, and because many species are active at night, some photographs may be blurred or overexposed owing to the way the cameras work at night.

#### Data description

The dataset is a set of images and a file `train.csv` that maps each image to a particular group of animals: <https://disk.yandex.ru/d/MiCI_OW7U1r_Dg/dataset>.

The correspondence between the group index and its name is given below:

- 0 — hare,
- 1 — wild boar,
- 2 — cats,
- 3 — mustelids,
- 4 — bear,
- 5 — deer,
- 6 — panthers,
- 7 — bovids,
- 8 — canids,
- 9 — marmot.

Note that the dataset contains difficult examples: photos in which only a small part of an animal is in the frame, as well as night-time and blurred shots.

The labelling by group was carried out by research specialists engaged in monitoring the state of wildlife populations.

The data are split into a training set and a test set in a ratio of approximately 70% / 30%.

The test part is split into a public part and a private part in a ratio of approximately 40% / 60%.

#### Scoring criteria

This is a multi-class classification task, and the metric chosen was the `macro F1 score` (`F1` is computed for each class and then averaged).

The following file contains a code fragment for computing the metric and evaluating participants' algorithms: <https://disk.yandex.ru/d/MiCI_OW7U1r_Dg/ai-stage1.py>.

#### Solution

You are required to develop an algorithm that classifies the group of animals in camera-trap photos and to present the result of its work as a CSV file with the columns `image_name`, `predicted_class`.

Link to the reference expert solution: <https://disk.yandex.ru/d/MiCI_OW7U1r_Dg/baseline.ipynb>.

**Answer.**

The solution to the task is a CSV file with predictions, uploaded to the competition platform to evaluate the quality of the solution.

Example of a submission file: <https://disk.yandex.ru/d/MiCI_OW7U1r_Dg/sample_submission.csv>.

Also, the solution that took the highest places on the private leaderboard: <https://disk.yandex.ru/d/MiCI_OW7U1r_Dg/best_submission.csv>.
