Added Map Overlay Of Road Surface Types To My New Cycling Routing Web App!

Hi, I mentioned a few months ago that my two roommates and I have been developing a brand new cycling routing site that’s completely free and offers a ton of cool features like auto route generation, weather forecasting along routes, paved/unpaved/hilly/flat/scenic/racy/etc. routing profiles, etc. and now a super cool surface road surface overlay!

The site is https://sherpa-map.com

Currently, the overlay supports the entirety of North America (the routing and everything else works for the whole world!), but I’ll be generating tiles for Europe next, then Australia, then South America, until the whole world is done.

The overlay is a mix of OpenStreetMap data, heuristics, and AI classifications. I actually pulled 40,000 (and counting, as I’m still trying to make it better!) pre-classified images of roads and trained a data segmentation AI (deeplab with resnet50 backbone) to pull the best 224x224 image of a road out of a 640x640 satellite image, then I trained a resnet152 classification AI to determine if it’s paved or unpaved, then another AI to determine if the unpaved is gravel/dirt/unpaved!

I also looped all of this refined data back into our routing software, Graphhopper, which we host on a server in our apartment basement, so I can far more accurately keep routes on pavement or off of it than practically any other site, as all others simply use standard OSM data for road surfaces.

Beyond that, I also integrated a powerful physics simulator I built to offer THE BEST duration estimation for your cycling route. After pressing the “Est. Duration” button in the bottom left, and choosing how strong you are (from beginner to pro) on a slider, a message like this appears:

This takes into account everything you could possibly imagine. Depending on the surface type it will choose a bike configuration, so pavement = road bike, pavement with a little gravel = road bike with gravel tires, all the way to determining if there’s single track on your route (by looking at a moving window of turns above a certain degree) and interjecting XC mountain bike or even a AM mountain bike!

I even calculate how much you may brake around turns when descending on sketchy surfaces, I dynamically adjust your assumed CDA so the simulation “sits up more” when climbing and “gets more aero” when descending. I mean heck, I account for the air pressure at the given altitude you’re riding at!

I basically used 2000 lines of code from this project GPX Route Speed Estimator for Cyclists: Multi-Surface, Weather, and Nutrition Strategy to create this button.

So, I’m trying to share this overlay and the new features of my site with anyone who might want to use them! Again, everything on the site is totally free. It still blows my mind that some sites, like RideWithGPS, require premium to estimate how long it might take to complete a route, and I’d bet money they’re using statistics instead of physics.

If you have any thoughts, feedback, or anything else in general, I’m all ears!

3 Likes

This looks super cool – I’ll definitely play around with it!!

Wonderful! Honestly, our biggest motivation for working on this site is just seeing people use it occasionally. Since you are part of the Trainerroad team (I’ve enjoyed your software and plans many times over the years!) I’m sure any feedback or thoughts would be especially insightful.

2 Likes

Always impressed with what a few skilled developers can achieve without any red tape!

(I work in enterprise IT lol)

Me too, for my day job!

Regarding this site, we break and fix things so fast, that it’s almost like the break didn’t happen! Most of the time…

If you’re curious, I perform most of the back-end and frontend programming, my brother/roommate taught himself frontend GUI development to make all of the GUIs, and my other roommate, a longtime friend going back to high school, happens to be an expert in everything Linux server.

In fact, when we rented an apartment together it was a stipulation that we had to find room for his person-sized server rack. He kept it around for experimentation, Plexshare, Minecraft, etc. but I knew that it was essentially a great opportunity to develop and host something.

As we live in Wisconsin and all have a shared love of gravel cycling, we first made a simple tool that projected gravel roads from OSM data, then we wanted to route on them, then we wanted to train AI on said data and find more roads, and so on…

It’s been so much fun to work on this, we even have react-native IOS and Android apps in the works! A collaboration mode where multiple people can work on one route at once, a specially tooled-up version dedicated towards multi-day tours, and much more!

If you have any questions about the tech stack, specific software and technologies we’re using or anything in particular, I’m happy to answer.

1 Like

Omg, this is cool! I need to play around with this on the computer.

That’s so kind of you! Also, yes, it works much better on a computer than mobile, mostly because I used vector tiles when zoomed in (to save bandwidth and tile creation time) and raster tiles when zoomed out. Phones tend to die if zoomed out just a tad with the vector tiles, it’s much snappier on a computer.

1 Like

I think react-native apps are pretty cool. Cuts down development time and need for multiple technologies and frameworks quite a bit.

I think this sounds really cool. What is the ressources needed for doing classifications like that at scale? Is it CPU/GPU intensive?

I actually don’t mind paying for good stuff. I pay for sites like RWGPS Premium, MyWindsock, Intervals.icu, Wandrer.earth, Climbfinder etc. I probably have way too many subscriptions :joy:

But I’d love to see if you could innovate and do the calculations based on physics rather than statistics.

For at least some of those subscriptions, I could get away with the free tier but I like to support. In any case, I am not a huge fan of free models where your data is being used for selling ads… (which is often the downside to “free” services).

Hi, sorry I didn’t reply sooner, I’ve been hard at work trying to create overlays for Europe. First, you may think I’m selling all sorts of data to keep the site afloat without having any premium options! Truth is, we simply love programming and happen to have the server, so it’s more of a project of passion, and I’m far more passionate about adding new awesome features instead of trying to figure out Stripe or some other pay-for service. Don’t get me wrong, it would be our dream if this site made money! Currently, we’ve probably spent around 2.5k on it, but heck we would have collectively spent that money on bike parts we didn’t need anyway.

At some point we may move to a premium modal, but I would love to add some more features first, and trust me, have a TON in the works.

Let me also adress a few quick points:

But I’d love to see if you could innovate and do the calculations based on physics rather than statistics.

I do… I spent 2 months developing GPX Route Speed Estimator for Cyclists: Multi-Surface, Weather, and Nutrition Strategy and integrated the same logic into the main https://sherpa-map.com site with the “estimate duration” button in the bottom left.

It can really only be rivaled by best bike split, but best bike split assumes pavement and road/TT bike. I assume everything/anything/plenty of mixes. It makes an entire physics simulation for each point (carrying the speed/kinetic energy from the previous point) every 25m for a route. It can get into the millions of simulations for a route beyond 100mi.

I’ve found it to be quite accurate! I’m going to loop it into logic (on the main site) to also give macronutrient and calorie breakdowns/sodium loss and add it to the chatGPT “AI insight” to really provide some juicey details.

Moving on…

I think this sounds really cool. What is the ressources needed for doing classifications like that at scale? Is it CPU/GPU intensive?

Kind of, so, I’m taking pre-trained models from hugging face (just google it) and further training them for my needs. This can be accomplished with a standard gaming GPU (in this case, a RTX 2070). A constraint, is most of the models were pre-trained on 224x224 images, if I wanted to use 640x640 images of roads (which I can get) I’d have to buy a bunch of $30k GPUs, connect them, and train a “foundational” AI from scratch in a week or so. If I attempted that with my current setup, it would take months of training.

So, taking pre-weighted/pre-trained AIs and training them for specific needs, totally doable with a gaming computer! Who would have thought?

Note: I trained a segmentation AI to pull the best 224x224 image from a 640x640 image of a road so I can get better classification, it’s pretty nifty.

I think react-native apps are pretty cool. Cuts down development time and need for multiple technologies and frameworks quite a bit.

I’ve never used React before this and actively hate it, … I’m sure it has some pros, but gosh, give me vanilla javascript/python/rust/WASM/ heck even C++ any day… I’m sure it will grow on me though.

So, again, it costs us very little to host, I’d love to make some premium options at some point, but I have a developer mindset, not a marketer’s, so I’m not sure what to make premium, how much to charge for it, and in the time I could be implemented that I could have finished more features! If you have any thoughts, please do let us know.