Group

Open Source Solutions / Feed

This group is a place to share low-cost, open-source devices for conservation; describe how they are being used, including what needs they are addressing and how they fit in to the wider conservation tech market; identify the obstacles in advancing the capacity of these technologies; and to discuss the future of these solutions - particularly their sustainability and how best to collaborate moving forward.

discussion

Automatic extraction of temperature/moon phase from camera trap video

Hey everyone, I'm currently trying to automate the annotation process for some camera trap videos by extracting metadata from the files (mp4 format). I've been tasked to try...

7 0

Hi Lucy

As others have mentioned, camera trap temperature readouts are inaccurate, and you have the additional problem that the camera's temperature can rise 10C if the sun shines on it.

I would also agree with the suggestion of getting the moon phase data off the internet.

 

Do you need to do this for just one project?  And do you use the same camera make/model for every deployment?  Or at least a finite number of camera makes/models?  If the number of camera makes/models you need to worry about is finite, even if it's large, I wouldn't try to solve this for the general case, I would just hard-code the pixel ranges where the temperature/moon information appears in each camera model, so you can crop out the relevant pixels without any fancy processing.  From there it won't be trivial, exactly, but you won't need AI. 

You may need separate pixel ranges for night/day images for each camera; I've seen cameras that capture video with different aspect ratios at night/day (or, more specifically, different aspect ratios for with-flash and no-flash images).  If you need to determine whether an image is grayscale/color (i.e., flash/no-flash), I have a simple heuristic function for this that works pretty well.

Assuming you can manually define the relevant pixel ranges, which should just take a few minutes if it's less than a few dozen camera models, I would extract the first frame of each video to an image, then crop out the temperature/moon pixels.

Once you've cropped out the temperature/moon information, for the temperature, I would recommend using PyTesseract (an OCR library) to read the characters.  For the moon information... I would either have a small library of images for all the possible moon phases for each model, and match new images against those, or maybe - depending on the exact style they use - you could just, e.g., count the total number of white/dark pixels in that cropped moon image, and have a table that maps "percentage of white pixels" to a moon phase.  For all the cameras I've seen with a moon phase icon, this would work fine, and would be less work than a template matching approach.

FYI I recently wrote a function to do datetime extraction from camera trap images (it would work for video frames too), but there I was trying to handle the general case where I couldn't hard-code a pixel range.  That task was both easier and harder than what you're doing here: harder because I was trying to make it work for future, unknown cameras, but easier because datetimes are relatively predictable strings, so you know when you find one, compared to, e.g., moon phase icons.

In fact maybe - as others have suggested - extracting the moon phase from pixels is unnecessary if you can extract datetimes (either from pixels or from metadata, if your metadata is reliable).

camtrapR has a function that does what you want. i have not used it myself but it seems straightforward to use and it can run across directories of images:

https://jniedballa.github.io/camtrapR/reference/OCRdataFields.html

See full post
article

Restoring the Mara Elephant Population Using Coexistence Tech Solutions with Mara Elephant Project's Wilson Sairowua

Wilson Sairowua
Listen in on our interview with Mara Elephant Project’s Tracking Manager, Wilson Sairowua, as he explains how MEP is using software, geofencing and drone technologies to resolve human-elephant conflict across Maasai...

2 2
Super interesting interview! I especially liked the last minutes where Wilson Sairowua explains about the experimental farm to see which crops elephants like and dislike. Just...
Great suggestion @Frank_van_der_Most ! It's really interesting to see conservation tech interacting with other forms of environmental tech. There is definitely room for effective...
See full post
discussion

Experience with SeeedStudio T1000 as tracker and data logger.  

Hi Everyone. Recently, I got a chance to work work the SeeedStudio T1000 tracker and I made a tracker and data logger with it. It comes with a LoRa module to transmit the...

1 2

ooh very cool Salman! Amazing how much tracking devices have come down in price over the years and LoRa/LoRawan is just such a perfect fit for GPS data. Thanks heaps for sharing.

All the best,

Rob

See full post
event

AI for Eagles Challenge

In the AI for Eagles Challenge, by FruitPunch AI 50 AI enthusiasts and experts from all over the globe will be training classifiers to recognize golden and white-tailed eagles in flight and classify them into age groups...

0
See full post
article

New Add-ons for Mbaza AI

At Appsilon, we are always working to enable our users to get the most out of our solutions. With this in mind, we are happy to introduce two new add-ons to Mbaza AI. 

1
See full post
article

Sustained Effort: The Environmentalist’s Dilemma

Jacinta Plucinski
In this article from Jacinta Plucinski & Akiba of Freaklabs, they share advice on organising your thoughts around building short-term and long-term sustainability considerations into your conservation technology...

0
See full post
discussion

Global shortage of Raspberry Pis - What are the alternatives

So, there is a global shortage of Raspberry Pis, the open source micro-computer that has been popular amongst open hardware designers and hobbyists alike. Like...

8 0

Have you considered Arduinos?

UPDATE: The Banana Pi didnt work out for us as it was not possible to track back all the components and ensure that they were responsibly sourced. The Rock board did work for us and we were able to port our system onto this. We will be rolling out units using this over the summer. It also looks like Raspberry Pis are coming back on line and we were able to secure a bulk order for deliver mid-summer

See full post
discussion

Moveapps: EMAC23 Coding Challenge

Motivated by having been named a Conservation Tech Award grantee in 2022, we are launching the EMAC23 coding challenge to Equip MoveApps for Conservation.Pick one of five use...

4 0

Super initiative! I hope you get a lot of entries to this coding challenge!

See full post