20 sec video to full on CFD AERO test!

So, loooong story short.

I created a system that uses a 20sec video of a cyclist on a bike and turn it into a full on wind tunnel (CFD) test.

(Feel free to skip, this is TL;DR background) I developed a cycling routing website/map, then a custom routing engine, a physics engine for “best bike for said gravel cycling race”, after falling in love with gravel cycling…, then, after realizing I needed the *skillz, mountain biking, so I created a giant pipeline that made it so you could take insta360 video of a mountain bike course and turn it into miles long 3d representations… but I couldn’t host them…

Then, remembered my love of going fast, (I’ve loved everything from Ironman to road racing to epic graveling and beyond), and I thought… could I turn a quick video of a cyclist on a bike to a CFDable model?

(if you aren’t an aero bike nerd, the thing that is aero testing that isn’t a wind tunnel is “computational fluid dynamics”, which is given a bad name in some respects because it isn’t a “true wind tunnel test”, but… do you know the positives it has over wind tunnels?? You can test with particles (like a dirt cloud in a gravel race), rain, clearly see you aerodynamics in a peloton, etc.).

So, it’s suuper late, and I have soooo much coming from this project, but I created this:
wind
from 500ish frames from a 20 sec phone video of my twin on his gravel bike (braving 28F wisconsin weather to capture his summer aero kit):

I basically went from a quick video of that to a cloud of points representing him in space using bleeding edge technology (something called sfm+nerf):

Then I destroyed myself programming for over a week… because these points are not derived from Lidar, so, all current methods fail to produce something from this I can use in aero testing (these are tiny circular colored points that are always facing the camera, looks good, but, to make polygons, the points need “direction”)

I went to the ends of the earth try and solve this, I even forked the code behind the visual effects in Starwars (openvbd), created a custom C++ + Opengl program in this vein, and it failed to produce something good enough.

So, I developed a custom solution of “points that do not have an inherent direction to aero-testable/3d printable mesh)”. that resulted in this:

Sure, you need a pretty extreme computer, but that took 1 minute to make, and yes, I smoothed it using some basic software:

here’s the frontal view for the “A” of the “CDA”:

In 3d I calc’d scale off of a 700c rim, if you were curious.

To put things in perspective, if you have an extremely powerful computer … like “SLR Trek Speed concept level computer”, it takes 30 minutes to use the most bleeding edge tech (nerfstudo->tsdf) to create this:

The funny thing is, the algorithm I built to derive mesh from points, which is in its infancy, so, plenty of room to grow, ex. generated my bro’s hands on his aero bars on his gravel bike to the point where you can pick out the fingers/knuckles easily:

I even found that a group already thought of this! Lidar gun to CFD test, Staczero, and, judging by their frontage, with actual Lidar, their models look like:

And they claim to test within 2% of real windtunnel tests?

Which… from my experimenting so far, I’d believe, I’ve been experimenting in so many ways, different yaw angles, water bottle configurations, heck, I have a few tests queued up of wheels with tires of different tread patterns, and yes, body position matters so much!

Every test has checked out… I mean, the actual CFD software I’m using, OpenFoam, can account for the structural compression of an aircraft above mach .3 and use the supposed (computed) deformed shapes as input for aero testing in that state… so… 20mph incoming wind at different yaw angles? easy.

I just wanted to “Dylan Johnson” my gravel setup, and happened to go too far programming sometimes, but I’m going to have fun testing everyting

So, this is a quick, off the cuff story, honestly, I thought the fact I could replicate entire mountain bike courses from a ride through with an insta 360 strapped to my helmet would be the ticket to a Fatmap replacement that Strava made a vacuum of:

Would be interesting, and it still may be! but, the concept is proving challenging to host, so, might as well make aerodynamic testing accessible? (Also, I have a killer replacement for Strava’s “segments” with 5m resolution in the works, as in, a single segment could be 5m, and is impossible to cheat)

So, I can use a single video to then generate a model for aero testing, limitations? If a subject in the video is super reflective or transparent, that’s problematic…

Can my models look better? Yessss I have massive expertise in AI, and am working on incorporating some powerful ensembles to get to even higher levels of fidelity.

Where am I going with this? IDK, I’m going to throw together a website and gauge interest, I’m probably going to aero test everything I can get my hands on or find a suitable video of, but I’m curious, what do you guys think, I can take a video of anything that isn’t transparent or super reflective, and, give me something for scale, get pretty darn accurate, like, easily compute the difference in waterbottle placement, as an example, check out how disc brakes affect the flow of air here:

for context, that’s 10m/s wind (22.3mph air) magnitude, here’s a scale:

That’s the “speed of the wind”, I threw this color at the bike/model:
image

As you can see, it slammed into the disc brake, created a pressure vacuum, and vorticed afterward, recouping that energy… interesting.

So, I’m working on this for the foreseeable future and am curious on anyone’s input.

25 Likes

This is very interesting. Looks like you e already put a huge amount of time and effort into something that may prove to have an eventual practical application.

Best of luck to you in progressing this to a point you can deliver that practical outcome on scale and maybe even monetise it.

I imagine providing a service in the future where riders can submit successive videos in real time and have comparative aero assessment of their adjusted riding position would have great utility.

:+1:t2:

4 Likes

I appreciate the feedback, currently, it’s a pretty quick process, but I’ve been refining the pipeline and working to add as much fidelity as possible, my team is first whipping up a quick shopify website and I’m probably going to keep some of the pipeline manual for now (3d touchups and such) and am experimenting with adding perfect spokes/wheels, attenuating them to the model rather than trying to fully capture them, animating the wheels, animating the rider, using an armature to iteratively try different positions, etc.

I could even start doing this at a decent scale right now, but have no LLC or anything as of yet… but I’m hoping to get it together soon.

1 Like

This looks great! I’m a software developer as well, and it sounds like you’ve come up with some novel approaches to solve the problems - an awesome side project, good luck in getting stuff together to monetise it

I’ve attenuated my expectations at this point… after so many “potentially good ideas” that turn into nothing but a “leaning experience”, if this is remotely successful I’d be over the moon, but, regardless, I’m going to build the most aero frankenbike possible, I will optomize… everything!

Also, what do you work on? I love to talking to other programmers.

1 Like

Still a great learning experience regardless of where it goes!

I’ve worked in financial services for most of my career, but now I work for a consumer facing app.

Dude, that’s an amazing project !

:100: I’m riding long distances (I’m into randonneuring) and I find it really hard to maintain a good aerodynamic position for hours on end.

I write software for a living too, and since I spend a bunch of time on TrainerRoad anyway, I figured I’d write something to help me improve my position while I train. But I have enough friends that are into cycling that I made it so others can use it and it’s available at https://www.lowcda.com . Actually it’s one of the guys from my cycling club that pointed me to this thread :wave:.

It’s quite different from your detailed CFD analysis - it just uses your webcam to give real-time feedback on your position, focused mostly on lowering the upper body’s frontal area. Nothing fancy, but it’s been helpful for building that muscle memory of staying low and aero longer sessions. I particularly noticed I had a bad habit of shrugging my shoulders or looking down too much during harder intervals on the trainer. The visual feedback really helped me improve my position during sweet spot intervals, where I get sloppy as fatigue set in.

I had originally made a long/boring video about it but I asked Claude to make an ‘as seen on tv’ script for it, and re-edited a shorter video with the best announcer voice I could muster. I just put it up on YouTube if you want to check it out: https://youtu.be/cHm6ftXXC3Y

If you are using Trainer Road and you are interested to work on your position while you train, PM me and can give you an invite code. This is just a fun side project for me and I’m paying for hosting so I’m trying to limit the signups for now.

In any case, I’m really eager to see where you are going next with your project, I think you are on the right track with leveraging modern computation to make some of these technologies more accessible to non pro athletes.

The resolution looks insanely good from a video. Does this pick up aero garments dimples (socks, skinsuits, etc… ) ?

Anyway, hats off to you, it’s super cool !

4 Likes

Have you looked at aero.chat/ai?

This is cool. Did you end up with any CDA values? I just aero tested outside with my new Stigmata (Chung method) and have solid results so lmk if you want a video to cross check work.

1 Like

Very cool, very impressive!

4 Likes

Apologies for not responding quickly, I’ve been working extremely hard to improve this, I’m figuring out how to pull more detail into the final model for testing by the minute:

Let me start addressing some of these and provide more insight, also, here’s one more new pic:

I love hearing about other side projects, and I checked it out, quite nifty! I’ve been considering integrating something similar using a web cam and either a UNet or
MiDaS model, or using them together… and getting an accurate cuttout for similar realtime analysis, but you, and a few others, seem to already have made great options, so, I may just stick to this for now.

Regarding what it picks up, yes and no, here’s a closer look at a final reconstruction before postprocessing scripts:

I do get a shocking amount of detail, but the nature of the points that are captured do define much of the surface quality.

Here’s the deal though, this is the very beginning, and, for testing, I had backed one of the crucial steps down quite a bit, creating the Nerf, I used the lowest quality one available, and I could up the quality dramatically by just letting that run longer…

In addition, I’m going out of my way to automate everything as much as possible (so this can be reasonably priced), so I’m trying not to just “cheat” and use sculpting tools to fix things, I’ve created a complex network of AIs to manage refinement in multiple stages.

So, long story short, could I get the dimples on a skinsuit? Yeah, probably, the only painpoint for this entire workflow is transparency and very reflective surfaces, in fact, a repeating pattern like dimples would actually enhance the quality quite a bit, as it will have more features to track frame to frame.

Also, Here’s an example of my buddy’s bike from 300 frames of 720p phone video with vague instructions as to how to take the video (I’ve been testing the possibility of this maybe being a thing in several capacities)

that took like 15 minutes to make, and Danm did it turn out to be aero, but, I guess there’s no surprise there lol.

Lastly, I’m reallllly trying everything imaginable to make this work with the highest possible quality, because I’m totally the type of guy to spend entire days testing everything.

In my quest to “get faster” I’ve built an entire cycling physics engine, an AI offline on the phone that you can talk to it to get statistics about your ride, and used AI/probabilistic techniques to create a “perfect gel” that’s a hydrogel (like Mautian gels) + cluster dextrin (the standout ingredient of Scratch Superfuel) (and a bunch of other things in between, citric acid, salt, fructose, etc. ) with an osmolality that’s within a suitable range…

I built, and do host (privately, it’s not done yet) an entire replacement of Strava’s segments that has 5m accuracy, is designed specifically for mountain bike courses, as in, you can have a segment that is 5m long, and you really cannot cheat it).

Why don’t most of these things come to market? Because I’m already moving on to the next idea, but you guys are really helping validate this one.

This whole idea only happened because I was trying to make something to fill the FatMap hole that Strava left us with, … couldn’t host it, and wanted those aero gains.

In any case, I made the TL:DR longer than the story, but that tends to happen with me.

3 Likes

Yes I’m replying to my own comment, WHAAAAT, trainerroad forum supports sketchfab models? That’s niccee.

Thanks!

I just did, thanks to your link, very stylized page, groovy, it is supporting my thought process of not breaking into that market (front facing webcam realtime forward facing area), although, if I had enough data, I could totally train a visual AI to just “guess” your Cda from a side profile in realtime, I’m going to have to test that sometime…

I do wonder though, how perspective plays in that, as I’m computing in a forward facing orthographic manner in front of the model (i.e. things further away do not get bigger), I’d be curious if they’re accounting for that.

Ohhhhhh totally, I didn’t list them on purpose because I thought you guys wouldn’t believe them. The deal is, my twin and I are just randomly extremely aero, I’ve biked soloish 120 miles at 20.7 mph, no aero bars, no skinsuit, just nice ride around Door County WI (one area had terrible pavement though) at… 205 watts Around the peninsula with my bro! | Strava (yes it was with another person but only recently has he become annoying fast, so I had pulled the entire time in that spin).

So, yeah, his Cda came out to .21, which, aligns perfectly with our testing, we’re close to an outdoor Velodrome (in Kenosha), so, we test these kinds of things. He can hold 20mph on a gravel bike at sub 200watts, if straight calculated, is even better than .21, but, if you factor in the tires, it aligns pretty closely with expectations. In the video, he was holding his MOST aero position, not sustainable.

So, I’d love to post Cda, but then I have to go on a tangent like this. Also, I’m even more Aero, road bike, no aero bars, yes skin suit, 20mph on asphalt cracked loop (someone drove a car into the velodrome… it needed a lot of repair) at 157 watts, also, yes, I have many power meters and quadruple test things.

If you sense some sort of competitive spirit in the area, yes, this and many of our other projects are born because as roommates, with a combined 20ish bikes, doing everything from mountain bikeing to TT, we’re just trying to make solutions to get faster than each other.

ah, I code HSA’s for a living, it gets the rent paid, I’m hoping to ether make my own job or keep making a heck of a portfolio… and be aero.

2 Likes

pretty cool, will you test your software vs wind tunnel for validation.

yes

1 Like

What do you mean by this? That if you had the data, you could verify the start and end points?

1 Like