Hacker News new | ask | show | jobs
by qwertox 631 days ago
Is it? I assume that you are thinking of using a 3rd-party API endpoint to which you upload the image so that the service decides for you if it is a bird and which kind of bird it is. Or you use something like Firebase.

Because if that is the way you'd solve this problem, then just sending lat/lon to a service to determine if it is in a national park is even easier, as it's just a GET request.

I'm still unsure about what would be harder to set up locally.

2 comments

https://tech.amikelive.com/node-718/what-object-categories-l...

Bird is in the default COCO dataset. I haven't look for birds in images, but for people yolov10 is fewer lines of code to detect if there is someone in the frame than it is to setup a flask server for the API calls.

Using a service for this would kind of suck if you're _in_ the national park, due to cell service. The ML portion of this is probably still a bit harder than the GPS bit.

ML:

    Grab yolov8

    (Optional?) Fine tune it on bird pictures

    Convert it to CoreML, do whatever iOS stuff is needed in XCode to run it
GPS:

    Get https://www.nps.gov/lib/npmap.js/4.0.0/examples/data/national-parks.geojson (TIL this exists! thanks federal govt!)

    Stuff it into the app somehow

    Get the coordinates from the OS

    Use your favorite library for point+polygon intersection to decide if you're in a national park

    Bonus: use distance from polygon instead to account for GPS inaccuracy, keeping in mind lat and long have different scales.
...actually the ML one might be easier, nowadays. Now I kind of want to try this.
> Use your favorite library for point+polygon intersection to decide if you're in a national park

it's like 50ish lines of code in C, just iterating over the points (with the polygon represented by arrays of points). The algorithm is linear with regards to the points.

True!