Other things on this site...

[Blog archives] [Categories]

Job: Postdoctoral Fellows in AI for Biodiversity Monitoring

I'm pleased to announce that we have 2 two-year postdoctoral positions available.

We're looking for early-career researchers who would like to develop AI for sound and image recognition of nature. The positions are here in the beautiful Dutch city of Leiden, as part of projects funded by Horizon Europe. At Naturalis, you will work in a team with experts in both AI and biodiversity, and you will also collaborate with project partners in other European institutions.

Full details here: https://www.naturalis.nl/en/about-us/postdoctoral-fellows-in-ai-for-biodiversity-monitoring

Deadline: Sunday 26th June

Please feel free to contact me with any questions! And please forward this to anyone who may be interested.

| science |

Academic job opportunities! AI, biodiversity and sustainability research

I'm really excited about the developments going on around me. I'm working with great people on AI for biodiversity and sustainability, in two lovely academic departments in the Netherlands (Tilburg University and Naturalis Biodiversity Centre). You can join! That's part of what's exciting. We have job opportunities!

To see a bit more about what we're up to, look at the Arise project (Naturalis and others), the Cognitive Science and AI department at Tilburg (here's a sample of the recent research published from CSAI), and the Evolutionary Ecology research group at Naturalis.

Send me a message! Happy to give a little bit of advice or answer questions.

Naturalis and Tilburg front doors. Come in!

| science |

Pea and dill Dutch croquette (kroket)

Dutch people love a croquette ("kroket") and so it was only a matter of time before I attempted making one!

The Dutch croquette is typically eaten on a bread roll with mustard or mayo, and is sizeable enough to be a light lunch. The outside should be crispy and the inside quite liquid and oozy, so that when you crunch it in your bread roll it becomes a mess of sauce and crunchy bits. Many croquettes aren't vegetarian of course, and the standard vegetarian version is usually something like potato-and-mixed-veg.

This version is inspired by a flavour combination we saw on TV - pea and dill - and it's lovely and light, fresh, and spring-y. Should I confess that we saw it on the Dutch version of Bake-off?

  • 3 medium-to-small potatoes, peled
  • 75g vegan butter block
  • 75g plain flour, plus extra for coating
  • 1/4 of a small leek, or 1/2 a small onion, finely diced
  • a small handful of chives, finely chopped
  • a large handful of dill, finely chopped
  • a few leaves of mint, finely chopped
  • 200g peas (frozen is fine - you don't need to completely defrost them, just get them out at the start of the cooking)
  • 400ml plant milk
  • Salt and pepper
  • 1 egg (or some plant milk thickened with cornflour)
  • 80g breadcrumbs

Chop the potatoes into medium-sized cubes and put them in a big pan of hot water. Bring it to the boil and boil the potatoes for 15 minutes. You can prepare everything else while the potatoes are boiling - there's no need to worry about the potatoes too much, they need to be just need to be properly softened to make a soft mash. When the potatoes are done you can just drain them and leave them until you're ready.

Meanwhile, make a white sauce. In a saucepan on a medium heat, melt the vegan butter and add the flour. Stir this all around with a whisk and cook it for about 5 minutes, keeping it moving, until the raw flour smell has gone (careful not to burn). It should be quite a thick goo in the pan. Add a bit of the plant milk and mix it with the whisk, then a bit more, then all the plant milk, and make sure everything is evenly mixed. Allow it to continue to cook gently for a little while, while you prepare the flavourings. This should be quite a thick white sauce - it needs to be fairly thick so that it will hold its shape later.

Now is a good time to finely chop the dill, chives, mint and leek, if you haven't already.

The potatoes should be done and drained. Return them to the big pan you cooked them in, and mash them with a potato masher. Then add the peas and mash a bit more, to crush them lightly and distribute them through.

Add the dill, chives, mint, leek, and salt and pepper to the white sauce, making sure it's all mixed quite evenly. Then pour the white sauce all into the mashed potato pot, and mix to make sure everything is evenly distributed.

Leave this to cool in the pan until it's cool enough to work by hand, probably 1 hour. At that point you can also taste to check the seasoning. I needed to add more dill and salt+pepper than I had originally expected.

Next, it's time to add the breadcrumb coating. Set up a "breading station": 3 bowls side-by-side, with (a) flour (b) egg/plant-milk (c) breadcrumbs. You now need to take portions of the main mixture, perhaps golf-ball sized, and form them into little cylinders. How you do that is up to you! We did it by hand, which is messy, for sure... Other people on the internet have used a piping bag. For the Dutch kroket it should be a few centimetres long, which is too long to be shaped using two spoons as seen in some other receipes.

Anyway, you make your little cylinders, then with each one you roll it in flour then egg/plantmilk then breadcrumbs, to get a good coating. You could repeat the egg and breadbrumb stages to get a thicker crust. You might be able to get away with just breadcrumbs, depending on how sticky your mixture is.

Put these breaded cylinders into the fridge for at least 1 hour to firm up.

Using a deep fryer, or a pan fille dno more than 1/3 with vegetable oil, heat up the oil until it's hot. 180 C is the official temperature to use, but I don't have a way to measure that. Instead, I pop a tiny bit of the breadcrumb into the oil: it should be hot enough that the breadcrumb fizzles and floats to the top rather than just sinking. Then, put a batch of krokets carefully into the oil, and cook them for about 4 minutes. Make sure they're well-covered in oil. Be careful not to splash oil, and watch out for exploding krokets (which can sometimes happen, I'm told!). When they're nicely brown and crispy-looking all over, take them out and drain on kitchen paper, while you do the next batch.

OK! Now when your kroket is ready, serve it on a soft bread roll! This kroket does not go well with mustard, but a bit of mayo would be alright if that's what you like. But the delicate light flavour of the pea and dill should hopefully come through nicely!

| recipes |

Regulating dark stores

"Dark stores" is a stupid name. It refers to a new business model of rapid grocery deliveries (e.g. you can order some vegatables and milk and have it delivered in 10 minutes), and here in the Netherlands we see a lot of these shops popping up in towns with some fast-cycling bicycle couriers zooming around ("Gorillas" and "Getir" are the main brands we see around here).

The stupid name "dark stores" comes from an analogy with "dark kitchens", another recent invention: home takeaway food deliveries, where you might think you're ordering from "Wong's Palace", "Turkish Delight", or some other local restaurant with a cook who specialises in one particular cuisine - but in reality the food is prepared in some anonymous industrial-estate kitchen which churns out lots of different food under multiple assumed names. The yucky side of dark kitchens, even if they're done "well", is the dishonesty: using assumed names to give an aura of authenticity, and presumably stealing business from the genuine local restaurants who have been specialising in their own cuisines for years.

--- However, "dark stores" aren't dishonest at all. Assuming the business is done "well", then it's exactly the same as the established supermarket home-delivery services: groceries, sent out by couriers, but with a different approach to delivery planning and response times.

But these shops are coming in for criticism in the local press, and there's political discussion about what to do about them. It's often not quite clear what the complaint is, but it certainly includes:

  • Dangerous speed-cycling making pedestrian/cycling safety worse
  • Noise nuisance. From what...? Lots of cycle couriers and grocery deliveries, through into the evening, I think. It's not clear to me what makes this different from (a) home take-away deliveries (here in Leiden we see many many bicycle meal deliveries from Thuisbezorgt etc (the Dutch Justeat) on the streets) or (b) ordinary supermarket deliveries (we also see lots of supermarket vans driving around, daytime and evening).
  • Town-centre locations - even though these services are simple deliveries, they set up lots of little shops in the middle of town, i.e. locations that might annoy locals. They do this because you can't really achieve "10-minute delivery" promises without setting up lots of small depots everywhere.

From my perspective, I'm a little bit baffled about why this business model is the new bete noir for some local politics. They're pretty much entirely using cycle couriers here (not mopeds or vans), so it seems very low-impact, no fumes or engine noise. But I think all of those factors I've listed combine to make them a focus of irritation. Perhaps also there's a hint of the usual irritation when new and unexpected things happen in one's neighbourhood.

What should be done? Well:

  1. If these businesses shouldn't be setting up shops in the town centre or other neighbourhoods - they shouldn't have been giving licences to operate by the local council. I'm guessing that the local "zoning" and business regulations weren't designed with this business model in mind, so perhaps right now there's no way for town councils to regulate whether or not they should be in your high street. I'd imagine that an update to the zoning/regulations is needed, to make clear where they should put their depots. Amsterdam city council has "paused" any new locations opening up, and will spend this year deciding how to regulate them. Leiden's looking at it too, and other cities.
  2. The speed-demon couriers - yes, I'd say that's a genuine issue, because when a business offers guaranteed 10-minute delivery etc, there's no way for that to be achieved without strongly incentivising your couriers to go fast, take cheeky shortcuts, and make everyone else feel a little less safe. The solution, then, isn't to punish the couriers, but perhaps to regulate the market so that no-one is allowed to guarantee 10-minute delivery times, nor to incentivise their staff for anything shorter than 30-minute times? Although it might seem an odd thing to regulate, setting 30 minutes as the quickest guarantee doesn't seem unreasonable to me. It might not entirely fix the speed-demons but it takes away what is obviously a very big incentive.
| politics |

The British and Dutch COVID figures are both a bit off

The Dutch and British COVID figures are both a bit misleading at the moment, but for different reasons.

Both countries have had an overwhelm of their testing services. The UK's PCR testing (in December) was overloaded, getting so many cases that their results were getting delayed. But there's an extra reason now...

In January the UK Government decided that, because the rate of positive cases was so high nationally, they would no longer require someone with a positive LF test to get an official PCR test. The theoretical justification is plausible: when the rates are so high, the informational benefit you get from the expensive and labour-intensive PCR test becomes less, and the LF tests might be considered "good enough" for official stats. But - and here's where the data go strange - as soon as this announcement was made, I thought to myself, "The case numbers will go down, because instead of officially reporting their positive test-at-home test, people will put themselves in quarantine and not bother reporting it."

I think we can see this in the data. The official UK Government test statistics show a notable drop from the December peak to January, down to about 50% of what they were.

This might be a true drop-off, or it might be a drop-off in reporting, or a mixture of the two. So let's compare it to data that isn't affected by the rule change. First, the Zoe covid symptoms study data -- these show a fall from the December peak but not much of a fall, down to maybe 80%. Second, the ONS infection survey, where the fall is down to maybe 75%.

Making a rough engineer's approximation, then, I would offer a simple guess that about half of the drop in the case stats is due to an actual drop, and half of it is due to a fall-off in self-reporting. Or in other words, the official case rates since the rule-change (mid-January) can be estimated to have about a third of their cases missing. You should remember this when looking at any graphs comparing the situation internationally, because these incomplete figures are the ones that are shown.

UPDATE: Prof Christna Pagel also points this out and she's an actual expert. She stresses that the ONS survey is excellent, and should be the main source from now on for checking the UK's case rates.

The Dutch system has also been a bit overwhelmed by the sheer numbers, in January. But more recently, there was a data processing issue that meant approx 76,000 positive tests (in late Jan/early Feb) were not included in the stats. Those have now been "found" and incorporated into the official figures. It'll take a little bit of time before we can look at the graphs and sensibly see what's going on, I guess.

Overall, I'm trying to judge the situation here in NL and also back home in the UK. We had to do that in December while deciding to cancel our Christmas plans. Well - right now I've no idea who's doing better or worse, in numbers terms at least. Both countries' governments are starting to roll back restrictions, more rapidly than the scientific advisers are advising - but one of the countries has (now!) a stable government, while the other has a crisis of leadership at the top...

I should make clear that I'm not a medical expert. It's useful to blog these things sometimes, though - not least so that when I look back at all this, I'll be able to reflect on how right or wrong were my amateur's/engineer's reckonings. I've definitely mis-predicted peaks and troughs of the waves, so far, and I bet you have too...

| health |

Recommended reading & tools for MSc students (AI/audio/etc)

If you are working with me e.g. for your MSc project, here are some starting points for reading, and for tooling up:

Recommended reading:

  1. Computational Analysis of Sound Scenes and Events - a good textbook from 2018. Chapter 2 is a very good intro to many of the fundamentals in audio processing for machine learning.
  2. Computational bioacoustics with deep learning: a review and roadmap - a very up-to-date review paper by me, for animal sound in particular.
  3. The Good Research Code Handbook - Read this!
  4. Suggested reading: getting going with deep learning - a list of useful reading that our lab members rely on (from 2019).
  5. Probabilistic Machine Learning: An introduction by Kevin Murphy - a very good comprehensive textbook (new edition 2022).

Useful software tools:

I'm assuming you will be using Python, as well as one of the standard deep learning frameworks and/or scikit-learn, and also git to keep track of your code. These are standard (and you'll see some of that in the "Good Research Code Handbook" above). Slightly more specialist:

  • librosa - a Python library for working with sound files
  • Sonic Visualiser - a great desktop app to explore/annotate sound files interactively
  • Pytorch Lightning - you can use plain Pytorch, but Lightning makes a lot of deep learning easier.
  • Hydra - this helps you to manage the situation when you have multiple variants of a DL model to evaluate. See e.g. this blog for example
  • Pytorch Hub - you might use a pretrained model from here
  • Weights and Biases - a tool for keeping track of the outcomes of your experiment, and visualising them nicely
  • DVC - for keeping track of datasets, and/or machine learning experiments (ideally you know git already, for this). ... Though it seems not many people are keeping track of their datasets formally.
  • Audio data augmentation:
    • audiomentations is a good modern python library for that. Also look at the README, it has lots of detail, as well as (at the end) a list of alternative tools!
    • Scaper is an alternative to "ordinary" data augmentation, for the special case when you have short isolated "foreground" sounds, and you want to combine them with longer "background" sound recordings, to create synthetic soundscapes

Thanks to my PhD and MSc students for top tips added to this list!

| science |

Secret weapons in the vegan store-cupboard (& cheap!)

Recently I've been learning more and more how to cook vegan. It seems hard at first to be totally plant-based, for sure. There are some super cheap ingredients which I had no idea were so useful! So here are my absolute top tips, things to put in your store cupboard …

| food |

Indonesian peanut sauce (pindasaus)

This Indonesian-style peanut sauce is much loved by the Dutch in their "adopted" (!) Indonesian taste. It goes really well as a basis for gado gado, and also with many other indonesian dishes. Having never been to Indonesia, I can only claim this is a good match to the sauce we …

| Recipes |

Vegan pear frangipane tart

My mum's pear frangipane tart is a classic. Rich almondy frangipane, and soft pears, go together really well. Here, I've made a vegan version, partly by adapting Domestic Gothess's frangipane recipe. (Follow that link for lots of photos and tips on the process.)

The rich taste of frangipane is traditionally …

| recipes |

Favourite vegetarian recipes of 2021

We've discovered some lovely vegetarian recipes this year! The lockdown last year was actually a pretty good opportunity to get better at cooking, especially when we had to dig into our stockpile - yes, it really got to that point, strange to think now. This year was a bit less extreme …

| food |