# Model Extension

*English translation by SOTA – AI Community of the Hungarian original. Licensed CC BY-NC-SA 4.0, like the original. Organisers who would like this translation removed can email sota.ai.community@gmail.com.*

**Magyar MI Diákolimpia** (Hungarian AI Olympiad)\
**Task description · Summer Camp Selection (Nyári Tábor Válogató)**\
June 2026

*[Figure: see the original one-pager.]*

## 1. Model Extension

You are in charge of the camera network of a remote nature reserve. The heart of the system is a computer vision model that has so far reliably recognised **30 bird species**, with an accuracy of about **85%**. The wildlife of the area, however, is not constant: new species appear that the model has never seen, and monitoring cannot stop so that you can retrain the model from scratch.

Your task is to teach the model **25 new bird species** in such a way that it does not forget the 30 original ones in the meantime. This is the classic trap of *catastrophic forgetting*: if you fine-tune the network only on the new species, the old knowledge can easily vanish. The difficulty is increased by the fact that the original training set is no longer available (only four reminder images per base class remain), and you have few labelled recordings of the new species, which, moreover, are deceptively similar to the species already known.

The new species arrive in two waves: first **15** species (set 1, S1), then **10** more (set 2, S2). In set 2 only a fraction of the recordings are labelled; most of them have no label. Your goal is for the final, **55-class** model to recognise all three groups – the 30 original (S0), the 15 (S1) and the 10 (S2) new species – equally reliably.

For technical reasons, the cameras installed at different locations recorded images of different sizes; for uniform storage, each image was padded to size `(500, 500)` so that the original image, at its original resolution, was placed in the **top-left corner**, and the remaining pixels are black.

## 2. What you receive

All files are in the `baseline_data` folder.

- `base_model_weights.pth`: the weights of the model trained on the 30 base classes. The model is a fine-tuned version of a *ResNet18* pretrained on *ImageNet*, with its own classification head.
- `s0_images.npy`, `s0_labels.npy`: set 0, shape `(120, 500, 500, 3)` (30 base classes × 4 images), labels 0–29. These are reminder images; they do not come from the model's original training set.
- `s1_images.npy`, `s1_labels.npy`: set 1, shape `(150, 500, 500, 3)` (15 new species × 10 images), labels 30–44. These species strongly resemble the 30 base bird species.
- `s2_images.npy`, `s2_labels.npy`: set 2, shape `(250, 500, 500, 3)` (10 new species × 25 images). For each class, 5 labelled images (labels 45–54) and 20 unlabelled images (label: `-100`). These species are also hard to distinguish from the classes already known.
- `test_images.npy`: the full test set, which contains the same number of images from every class (0–54). Using it for training, analysis or any other purpose is **forbidden** (see *Constraints*).

## 3. What you submit

A single `submission.csv` file with the header `Id,Class` and exactly 1100 rows. `Id` is the identifier of the test image (0–1099, the row index in `test_images.npy`), and `Class` is the class predicted for that image (0–54). The order of the rows is free; rows are matched by `Id`. No model needs to be submitted; the evaluator computes the score from the CSV.

## 4. Scoring

Your score is composed of the *harmonic mean* of the accuracies achieved on the three subtasks (S0, S1, S2) and the per-class *macro-F1*, mapped onto a curve of 0–40 points:

$$
\text{Score} = \Theta\!\left( \frac{H_{acc} + \text{macro-F1}}{2} \right), \qquad H_{acc} = \frac{3}{\dfrac{1}{acc_0} + \dfrac{1}{acc_1} + \dfrac{1}{acc_2}},
$$

where $acc_i$ is the accuracy achieved on the classes of subtask $i$. The labels of the subtasks: **S0**: 0–29 (base); **S1**: 30–44; **S2**: 45–54. Because of the harmonic mean, **if any $acc_i = 0$, then $H_{acc} = 0$**: completely forgetting a single group zeroes the accuracy term, so score cannot be traded between the groups.

$\Theta$ is a manually calibrated, piecewise linear, strictly monotonically increasing function (minimum 0, maximum 40 points); between the breakpoints the score scales linearly. The thresholds are calibrated empirically: random solutions and solutions that neglect one of the groups score close to 0 points, while the full 40 points go to solutions that perform well on all three groups in a balanced way.

| Raw $x$ | Contest points $\Theta(x)$ |
|:---:|:---:|
| 0.15 | 0 |
| 0.30 | 8 |
| 0.45 | 24 |
| 0.52 | 33 |
| 0.58 | 40 |

**Public and private test set.** The test set is divided into a public part and a closed (private) part. During the contest you only see the score measured on the public part on the leaderboard; the final ranking is decided by the result achieved on the closed part.

## 5. Constraints and technical information

1. Using the test set (`test_images.npy`) for training, data analysis, calibration or any other purpose is **forbidden**; no data leakage whatsoever from the test set is acceptable.
2. Apart from the weights in `base_model_weights.pth` and the pretrained models of `torchvision`, using any other external pretrained model or dataset is **forbidden**.
3. You have **25 upload attempts** in total; **the score of your best submission counts**. Scoring is carried out automatically by the **DOCK** platform on the basis of the submitted `submission.csv`; you do not need to submit a model.
4. The leaderboard gives feedback on the accuracy achieved on each subtask ($acc_i$); these are not worth separate points, but they can be used to fine-tune your solution.
5. Under the terms of its licence, the data may be used only for educational and research purposes; using the dataset or any subset of it outside the task, or uploading it to an external drive, is **strictly forbidden**.

## 6. Useful resources

- [torchvision models (ResNet18)](https://docs.pytorch.org/vision/stable/models.html#classification)
- [NumPy documentation](https://numpy.org/doc/stable/)
- [pandas documentation (writing CSV)](https://pandas.pydata.org/docs/)
- [macro-F1 (scikit-learn)](https://scikit-learn.org/stable/modules/generated/sklearn.metrics.f1_score.html)
