Barcodes for Birds

Cultured Scene spoke to Damien Farine about his recent paper on “An automated barcode tracking system for behavioural studies in birds”

CS: In your paper, you describe a new method for tracking individual birds using barcodes on backpacks. Could you describe for our readers (in simple terms) how this works?

DF: The system is based on a relatively simple series of steps. The first step requires that each individual has a printed barcode attached that is visible from above. In our case this required finding a safe and robust way to attach the barcode to a bird. After many trials, we found that the best solution was a small harness printed out of paper and attached with fine elastic string. The advantage of this approach is that the whole construction weighs only 0.2 grams!

The second step involves collecting the data. Data collection involves recording images (can be either photos or videos) from above the birds. In our work, we focus on recording data from targeted areas, such as perches and feeders, and use a combination of video (when we require fine temporal data of less than 1 second between observations) and photos (anything where observations spaced by 1 second or more are sufficient).

The third step is to extract the barcode data from the images. To do this, we use a published library that was designed for this purpose. The way it works is that the computer looks for and identifies anything that is a white square with a black border (which is what the barcodes look like). Once these are identified, the software then compares each one to a library of known codes. There is a bit of tricky geometry done here that means that codes can be detected in any orientation and even if they are tilted quite a lot. If that square is found to match a known code from the library, then the software records the coordinates of that square, along with its orientation.

The result is that for each image we get the location of all of the barcodes (and hence all of the individuals) in that image. By taking repeated images in time (e.g. using video), we can also get a movement track for each individual — much like collecting GPS data. Of course, there is a lot more analysis to be done from that point, and the next steps should then be driven by the research question(s). Although we don’t yet have many examples using these specific types of data, a few years ago collaborators and I published a study on baboons where we used simultaneous data collected on GPS collars every second to determine how groups made movement decisions.

Barcode detections of birds on a perch. A video making use of the system can be seen here. Photo by D. Farine

Our readers may be somewhat familiar with tracking methods such as PIT (Passive Integrated Transponder) tags, as used by Aplin and colleagues to study social learning in wild great tits – in what ways is your new method an improvement upon previous ways of tracking and identifying birds?

There are clear ways in which our new method can hugely increase the power of automated data collection. First, our method can record the location of multiple individuals at the same time. There is (theoretically) no limit as to how many individuals can be recorded in one photo. By contrast, only a single PIT tag can be detected at once, and the presence of multiple PIT tags or multiple antennas causes interference (and nothing is recorded). Being able to record multiple individuals might seem an obvious advantage in being able to increase data quantity, but importantly it also really helps with data quality by making inference much simpler. That is, we can collect precise measurements of the distance and time spent together by two individuals, rather than having to deduce this from a temporal stream of sequential data.

Another advantage is that images can be used to capture data from a reasonably large area (this is actually only limited by the resolution of the camera). PIT tag readers, by contrast, can only detect individuals when they come into contact with a reader. Thus, while PIT tag readers are useful for recording data from a focal spot, such as a puzzle-box, they cannot capture the individuals that are around that spot at the same time. Finally, the more traditional way of collecting data is to use visually observe colour-bands on individuals. This can be done either live (watch and record) or using video. However, these approaches are prone to error by observers (either incorrectly reading a colour, incorrectly reading the order of the colours, or writing down the wrong letters) or take an extremely long time (extracting data of identities from a single video can take hours). Our system does not suffer from fatigue or transcription errors, and we can precisely quantify error rates.

Where did the initial idea for this method come from?

In following studies (Biology Letters, 2014), we also showed that stressed juveniles used different social learning strategies and differences in their social behaviour also affected their song learning. The data for these studies were collected using visits to PIT tag feeders, and in the process of analysing these data I realised that one major limitation we had is that we could not assign directionality. Here we had a nice experiment, but unfortunately we could not tease apart whether the manipulated juveniles behaved differently or whether everyone else behaved differently towards them. As a result, I started thinking about and planning for new ways to collect data at finer-scale spatial and temporal resolutions. Having done my postdoc on a dataset where we simultaneously tracked individuals in a group of baboons at fine-scale resolution, I realised the power of capturing simultaneous observations. I first thought about using QR code technology, and while looking into this I luckily discovered work that was being done on insects using these barcodes.

Were there any big challenges or setbacks during data collection?

I was very lucky to be working with two excellent Masters students from the University of Konstanz in developing the project. I wouldn’t say there were any major setbacks, but progress on designing a suitable attachment was definitely incremental at times. The students tried a number of different methods before settling down on the final design, which took about one year from start to finish. The main part of this challenge was to design something that would be durable and robust, while at the same time safe for birds to wear for at least months. Because I am interested in studying social groups and the development of social bonds, it made our requirements quite distinctly different from previous studies that have used barcodes for very short periods of data collection.

You tested the system in captivity – could it be applied in wild birds?

Theoretically the system could be used absolutely anywhere. However, I would really urge anyone thinking of deploying a system like this in the wild to extensively test the deployment methods. For example, the process of developing PIT tags that were safe for birds in the wild took a number of years, had many setbacks, and ideally researchers should go through the same verification process for their own study population. Here we have something even more challenging because much more can go wrong when fitting a backpack. In zebra finches, we found that we had to monitor birds for several days before we could be sure the fit was good – a hard ask for a wild animal!

In the paper, you mention that barcode tracking has also been used with insects; do you think there is scope for using this type of tracking system with other taxa?

Again, the only limitation here is being able to fit the barcode in a way that remains visible. For birds this is a very important system because we can’t use some of the techniques that have been developed for mammals, such as identification using unique markings. I know that the system is currently being used for fish.

What sort of research questions do you think could be investigated using this barcode tracking technique?

This system opens up many new opportunities. We developed the system because of my interest in studying social behaviour, where having many individuals marked at once is both technically challenging and/or expensive. The system could easily be used to in studies ranging from physiology through to mechanics. For example we found that we can use high-speed images to collect data of zebra finches in flight. Any study that requires recording the location of individuals will benefit from such a system.

Although the idea of tracking barcodes on video sounds very high-tech, the equipment you describe in the paper is actually fairly affordable (GoPro cameras and Raspberry Pi computers) – do you think the emergence of this type of affordable technology has changed or will change the way researchers collect data more broadly?

We have run several experiments now where we have collected over 100 million observations of birds over just a few months, all for almost no cost. What I found most remarkable is that we could do this without any human interference — I automated the entire data collection process so that the images were recorded and transferred to servers automatically, and then processed overnight so that by midday the next day I had a complete record of every bird’s behaviour from the day before. I think this system will revolutionise the study of behaviour in captive birds (at least) by allowing us to collect highly-precise data from dawn until dusk, every single day. In doing so, I hope it will set new standards for what is expected from studies of behaviour.

What would your advice be for early-career researchers considering investing their time in developing novel methods like this?

The single most useful thing you will ever do in your career is learning computer programming. And I mean learning programming properly — a major problem with our field at present is that students only learn how to programme while doing statistics, and the two are confounded despite being completely unique. Instead, I recommend doing a first-year computer science programming course, or come to Konstanz to take my undergraduate class in computer programming for biologists.

REFERENCES

Alarcón‐Nieto, G., Graving, J. M., Klarevas‐Irby, J. A., Maldonado‐Chaparro, A. A., Mueller, I., & Farine, D. R. (2018). An automated barcode tracking system for behavioural studies in birds. Methods in Ecology and Evolution, 9(6), 1536-1547.

Boogert, N. J., Farine, D. R., & Spencer, K. A. (2014). Developmental stress predicts social network position. Biology Letters, 10(10), 20140561.

Damien Farine is a Principal Investigator at the Max Planck Institute for Ornithology Department of Collective Behaviour based in the Department of Biology at the University of Konstanz, and a research associate at the Edward Grey Institute of Field Ornithology (Department of Zoology, University of Oxford). His research focuses on animal groups, with the central aim of understanding the interplay between natural selection and social behaviour by studying animal groups in the wild.

About the author

Rachel is the ESLR Journal Secretary. She is currently a postdoctoral researcher at the University of Lausanne, studying social learning biases in children from a comparative perspective.
If you would like to contact Rachel about contributing to Cultured Scene, she can be reached at journalsec2@eslrsociety.org

Leave a Reply

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