(00:00) Differences between medium-res and high-res worlds: data sizes, off-nadir imaging, co-registration issues (28:42) High-res SAR/Umbra data detour: building damage estimation in Jamaica, matching imagery up to vector datasets (34:33) Embeddings mentioned (37:10) Differences in seasonality, illumination and histogram matching: foundation models mentioned, discussions around Krishna’s model performance over Gaza This is a public episode. If you would like to discuss this with other subscribers or get access to bonus episodes, visit christopherren.substack.com
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
SPEAKER_03So what are we talking about today?
SPEAKER_01Well, something that I have been thinking about a fair bit, maybe because I've been working with it a good bit for the past couple of years and then also just the past couple of months is high res. So, yeah, I mean, I'm curious how much high res have you worked with?
SPEAKER_03Very little, if not none, unless we count basemaps. There was that one SimCLR experiment that we did on... the Mapbox basemap, just to see what would come out. Yeah, that's right. And somewhat unsurprisingly, the model really honed in on just like the different acquisitions and the way they were stitched together,
SPEAKER_03which seemed so obvious in hindsight, but... But yeah, so that's pretty much the extent of my experience with high res, I would say.
SPEAKER_01But you've never worked with anything close to a time series of high res. Is that true?
SPEAKER_03No. Yeah, never had the fortune or misfortune of doing that.
SPEAKER_01And I think that's what I want to talk about. So I think almost... And this is a good question for our audience or whoever. Our 12 listeners. Like, are you working mostly with medium res, Landsat, Sentinel? Or are you actually doing a lot of high res? I've actually found the worlds to be pretty disjoint. And I always wondered why. Like, I always wondered, like, You know, until I was in this job,
SPEAKER_01I really didn't have, just like you, I'd looked at base maps, tried a few spatial things on some high-res base map type stuff, which I think is intuitive, you know, because you can resolve more things spatially. So it's like find things in space from this static point in time or from this mosaic. Yeah, until this job, I never worked with time series or time stacks of high-res. And I realized why... worlds are so apart and why they're actually kind of like
almost different problems so one thing i didn't realize or i just had never looked into enough so i feel like most people who worked with landsat or sentinel or modus you know you're kind of familiar with like sun synchronous orbits you expect the data to be imaged all the
SPEAKER_01time and You, you know, it's like every five days you're going to get a Sentinel-2 scene. Every day you're going to get a Modus scene. That's what you get. You don't task it, it just collects at the same time. That's just not how high-res works. And I always wondered why that was the case. Like, in the beginning, I think very naively, I wondered, is it just because, you know, we don't have access to all the data and all this massive amount of daily high-res globally exists and we're not looking at it, but...
SPEAKER_01when I kind of looked into it, I realized that's actually not the case. Like, and again, I think I learned this way too late and I think is obvious, but if you want to resolve at a higher resolution, you need a bigger telescope. Right. And so, um, it's just basically based on physics, like how wide of a swath you can image that is basically totally dependent on the size of this telescope, and that is what's governing your spatial resolution.
Forgetting multispectral for a second, just thinking about optical type of imaging.
SPEAKER_01And so the swaths that they're imaging are tiny, and
SPEAKER_00Mm-hmm. is insane like the the volume of the data right and so you have to downlink all the data or maybe you have to store some of that data on board and it's like that becomes this huge product like you're you're overwhelming all
these systems that are built to beam this data down and so that's another thing that totally went over
SPEAKER_01my head it's like oh that's just not even imaging all the time and
SPEAKER_03So could you, so what do you think of as high res? Like is five meter high res?
SPEAKER_01No. Is three meter high res? Sub one meter. Sub meter. Sub meter is what I consider to be useful high res. Okay. Because when you start looking at these like, you know two and a half meter five meter products they i feel like effectively they never end up being that much more useful than the sentinel 210 meter there's cases where that is not the case but for the most part i feel like you know sub meter is
SPEAKER_01where you really start resolving actually spatially resolving uh you know, fine building structure or planes and runways, you know, that's the classic example. Yeah. You know, like you actually start really seeing those things in a way that you just don't see at five meter.
SPEAKER_03Gotcha. And so from a data volume perspective... Like, okay, so it's scaling quadratically with... Sure, yeah. Because, right, as the pixels are square, but it's also imaging a smaller swath. And so it's still an issue despite that.
SPEAKER_01It's still an issue despite that. Yeah, yeah, yeah, yeah. At least from what I understand.
SPEAKER_03And so is this what the whole... The whole thing about like edge compute, like, oh, run the model on the satellite.
SPEAKER_01I think that's part of the motivation. I think part of the, and I don't know enough about this to know whether, you know, A, if this works at all or B, if this is being done by anybody in a really useful capacity. But I do think that's the idea is you beam down the analytics and or you beam down the like importance or you know like if it's not an important image you don't send it down or something like that maybe that's one use case and the other use cases you actually run some i don't know i guess
like if we just take
SPEAKER_01ndvi for an example do you just beam the ndvi down i have no idea
SPEAKER_03Yeah, I think maybe it's sort of like you're running some sort of object detection thing and you just beam down the detections.
SPEAKER_01Sure, sure, sure. Maybe it's like building type detection for infrastructure monitoring or something. Yeah.
SPEAKER_03Can you give us an idea of like this? So we're talking like... like hundreds of like what what kind what size are these images for like a swath or approximately that's a good question for a swath i don't know if i have that off the top of my head but i think one concrete like i've looked at a lot of gaza in
SPEAKER_01the middle east and so um Let's say we're looking at a Sentinel-2... Like, Sentinel-2 will image... I think in one Sentinel-2 footprint, you image, like, all of Gaza plus some...
SPEAKER_02Yeah.
SPEAKER_01You know, in that strip. And so if you just clipped it to Gaza, and you just took the RGB bands, and you convert it to byte... Uh-huh. I wish I knew the number off the top of my head, but I want to say that's like less than 100 megabytes.
SPEAKER_02Okay, for Sentinel-2.
SPEAKER_01Less than 100 megabytes for Sentinel-2. And it's possible I'm off a little bit, but I don't think I'm off by that much. And it's possible we were less than 50 megabytes. You know, we're talking byte scale, 10 meter pixels. Yeah, yeah, yeah. SkySat, which is the high res, you know, this is 50 centimeter nominally. I think true ground sample distance sometimes can be like 78 centimeter or something, depending. Okay. A, the swath is not the width at which they can image and the way
the overpasses work.
SPEAKER_01And there's one last aspect that I haven't talked about with high res, which is this agile pointing thing. So what they do is these satellites are designed because of these data volume issues, because of the field of view issues. They do agile pointing, so they tilt and rotate based on what they're tasked to image. And so it's There's multiple reasons to do this. One, so you're imaging the places that your customers care about.
And by doing that, you're just... It's more efficient from a data volume standpoint. And so these satellites can quickly slew in space to basically image multiple
SPEAKER_01targets within their tasking area based on where they are in orbit. And so... The thing that happens as a result of that is you get all this off-nator imaging. But what you do get is a lot of revisit. But anyways, back to the original question. Yeah, even with this agile pointing and the number of satellites that have in orbit, you almost always never get a full coverage over Gaza for a single day in the day
SPEAKER_01that it was imaged. Often you might have to mosaic to a week or even longer. Again, sometimes you do almost get a full, and it just kind of depends on where these satellites are in orbit and stuff. But in terms of data volume... If you did a mosaic, a byte-scaled RGB mosaic at 50 cm from Skyset, let's say that's what you did over Gaza, you're talking about 4 GB nominally.
SPEAKER_03Gotcha. I had no idea about this Agile pointing thing. Do... imagery providers provide tools to help you like co-register i mean that just seems like it would be a bit of a nightmare to like create a time series like a good stat basically exactly so i think this is the thing that also i mean these are all the things i feel like i've only realized over the past couple of years which is you
SPEAKER_01know So this whole process of orthorectification, which is like, take the position of the satellite in space, which has error associated with it, right? Because it's based on GPS and this and that. Take your digital elevation model. Take the model that you have about your sensor and then do all this processing to basically align all the pixels, right? For the things that are imaged. Yeah. there's way more positional error for the satellite in space
than you might expect.
SPEAKER_01It's not perfect. The ephemeris of the satellite is not perfect at all. So even just taking that without considering all the other things, it's like you might get a meter or two of pixel misalignment just all the time. And with 10 meter pixels, it sucks, but it's kind of fine. And with 50 centimeter pixels, that means if you have 5 meter positioning error and you have 50 centimeter pixels, you have 10 pixels of misalignment.
SPEAKER_03Yeah. When you say misalignment, you mean relative to the ground.
SPEAKER_01Yes, relative to the ground. Or even if you forgot the ground for a second and you just, and we're going to this time series, if we're kind of building this time series example, right?
SPEAKER_02Yeah.
SPEAKER_01Trying to do time series analysis from five SkySat acquisitions. And I'm picking on SkySat because I've used it the most, but I actually think this is the case with almost every high-res image provider, which is they do some level of orthorectification and co-registration, but they're optimizing kind of for the global. They're not optimizing for your local area where you, you know, you have a ground reference points and you do all this other stuff to make it better.
SPEAKER_01Like, they don't do that for you. And so the data that you end up getting, let's say you have these five images, it's like you have pixel shifts kind of, you know, five, ten pixel shifts per... per time step easily and um and so basically it's it's almost like all the time series stuff you thought you could do with sentinel 2 that you do very easily these ndvi time series whatever um all of that kind of doesn't work
because of all of
SPEAKER_01these imaging issues that you get um so it's kind of a huge problem and this is not it's not solved like i guess the providers aren't doing it so that it's not solved i don't think at least from what i understand the providers are not and the data that i have gotten to date the providers are not locally optimizing for your particular area because again you're almost always solving a local problem with high res because of yes because of these imaging constraints so uh
SPEAKER_01Yeah, they're not doing the, like, we picked four ground control points over Gaza, and then after doing our original orthorectification process, we did another correction based off this, and then we used this local digital elevation model here, which is better than SRTM. You know, SRTM is, what, 30 meter? That's what I was going to ask, is if your DEM is 30 meters, but your pixels are 50 centimeters. Yeah, exactly. Yeah.
SPEAKER_03That's also an issue.
SPEAKER_01Combine that with the final thing, which is kind of the nail in the coffin, which is because of this agile pointing... you don't have, you're not imaging at the same time every single day. And depending on where your satellite is at one point or another point, you're almost always imaging, like you might be imaging off Nader. And so between acquisitions, you have 30 degrees off Nader to the north or to this
direction.
SPEAKER_01And then the next time you have it 25 degrees, but the shadows are in a totally different direction. yeah and did you uh did you task did you run the tasking yourself or was this kind of like already in the archive okay so you i was just wondering if there's an option to choose like i want this from this angle like i don't want i don't want an
SPEAKER_03acquisition that's off nader i think that
SPEAKER_01It must be possible. It must be, right? It must be possible. I have never been in a position where I have been able to task an image myself directly. I've asked other people to task stuff for me, and they have done it, but I haven't ever made those types of requests. I have looked... There was one story I worked on where I did look at these two SkySat collections that were imaged at almost the exact same angle at almost the exact same local time. And actually,
doing an analysis between those two images was really cool because things were way
SPEAKER_01more lined up than they had ever been. interesting so given all these issues do you think do you think i'm just wondering why this is unsolved is it is it just that people don't really use high res the same way they use sentinel and landsat which is like let's do the time series but more like here's a small patch and i know where everything is already i just want to be able to interpret it myself as opposed to like co-register and overlay
SPEAKER_01I think that's a good question. As opposed to why it's not solved, I think the reason it's not... All the tools are there to solve it yourself. But in terms of solving it at scale globally, I think that's almost like... It's almost kind of an impossible problem to bite off in a way because of how locally specific you would need to get everywhere to do it. And maybe people are doing research into that. But it's kind of this...
it's kind of this crazy local geometry problem that you'd have to solve locally everywhere as opposed to like the global problem that they're solving imperfectly.
SPEAKER_01Um, so I think, I think there's that. I don't know enough about whether it's really being solved and, um, I actually don't think people are really doing time series analysis with high res. I think what people are mostly doing is sort of image interpretation or visual inspection. Imagine you're a person who's looking at port activity. I feel like this is a common high res use case. Port activity for ships or... you know, parking lots, you know, stuff like this.
SPEAKER_01It's like the core registration doesn't really matter, right? You just count the ships. Yeah, if the whole position of everything shifts a little bit, it's like, whatever, I'm just looking for the things I'm looking for. Yeah. No, I mean, it's interesting because I guess it's hard for me to really think, other than like, It's hard for me to really think of an application where you would want the high-res time series other than some change detection that you would want to be
SPEAKER_03highly localized, where counting the number of changes isn't enough, or doing it on an object basis isn't enough. You kind of want to map the changes and exactly where they are.
SPEAKER_01Yeah, so I don't know if the reason... I mean, I can think of some kind of object detection style problems where I feel like you would want to... A time... Excuse me, a time series would be nice, but... So there's all this geometry stuff, but let's pretend you've solved all that. I think the other issue is then sort of like the revisit. And if you go look in the SkySat archive and stuff, there are places that are imaged almost every day. Like, again, these ports and some of these other sort of things where you
can imagine there's high-paying customers who are submitting tasks such that that place is imaged all
SPEAKER_01the time. But generally, it's like... you're just not getting that kind of refresh. And so I think time series becomes hard when you have inconsistent spacing and just inconsistent observations. And imagine trying to do NDVI time series where it's like... i don't know you're doing the measurement and it's not at the same like solar time you know yep yep um and like the atmospherics that are going to
change and and you start getting into and again it's like how do you do atmospheric correction
SPEAKER_01generally at any time of day right that's not easy yep So I feel like it's kind of cool because it reveals all these things that I feel like nobody cares about when you're working with level two Landsat. It's like everything's done, you know, it's just ready to go. With high res, I feel like kind of nothing's done. And you have to think about everything from the ground up.
SPEAKER_03Yeah, on the atmospheric correction, I remember when Wyvern released some of the data, I was trying to look at it, and then I just went down a little sort of atmospheric correction rabbit hole, and it just felt like, you know, even for non-high-res data, I mean, I guess it's hyperspectral, but the error bars, like the number of assumptions we make when we're doing the corrections is mind-boggling. Like, it's kind of like you know like the sausage theory right like if you enjoy
something don't go and look at how it's made um yeah so how did you so going back to all of this like these geometry issues and i guess the problem you just mentioned now is more like one of illumination like at different points of the day um so how did you go about
SPEAKER_03like what tools did you use to solve these problems um
SPEAKER_01I think it's a little embarrassing. But yeah, sure, I can talk about it. So I think, first of all, I think it's important to say that because of these issues, I really haven't done a true time series analysis with these stacks of imagery that I've had. What I have done is a lot of pair-wise analysis. So imagine stacking multiple pairs of things And doing like basically kind of this single point change detection.
And so I think that does the following, like it basically, and I cherry pick. And so I cherry pick collections where the shadow offsets is like not that bad.
SPEAKER_01And the imaging geometry is close-ish.
SPEAKER_03Yep. So this is all visual and manual. Yeah.
SPEAKER_01It's all visual and it's all manual. Like literally I have gone into the geo transformation metadata in the geotiff and like shifted everything by a couple meters. Yeah. Right.
SPEAKER_03And then looked at it again.
SPEAKER_01And then looked at it again and been like, oh, this looks right. Because I basically picked my own ground control points. Yeah. And was like, oh, this is just like in this area that I care about, everything is kind of off by this much. And so the other thing too is because of the image of geometries, it's like this core registration error is nonlinear. So it's not just a fixed offset. It can be if you're working in a small enough area, which for the most part, I would say it kind of was, but. Okay. But basically, it's the most manual shit you could imagine.
SPEAKER_01Like, truly terrible.
SPEAKER_03I mean, I think that makes sense. I mean, when you were just describing the complexity of it, and I was... It seems like, yeah, this is unsolvable in the global case, but maybe someone could make a tool to make this a little faster or easier to, like...
SPEAKER_01Yeah.
SPEAKER_03I don't know. You could look at, like, six different shifts and transformations and pick the best one or something like
SPEAKER_01that. For sure, for sure. And the QGIS, like, georeferencer, you know, is pretty good at stuff like this. Like, you can basically take a base map, you can take your TIFF, You can draw ground control points. You can choose between a few models of how you want to basically do the co-registration fixing to those ground control points, and then it'll kind of do it for you. And so I've used that a bunch, but sometimes I just kind of cheat when I've got two pairs.
SPEAKER_01It's like I actually don't even care about the alignment to the base map. I just care about the relative alignment, and so I just do that.
SPEAKER_03Do we trust the basemap in that case, given that it's high res as well?
SPEAKER_01I think the basemaps are, at least what I found is the basemaps seem to better align with all the other vector data that you might, like if you pulled global administrative boundaries or you pulled road boundaries or building footprints, typically the basemaps tend to align with that pretty well. So I think It would be cool to really learn more about how basemaps are made.
SPEAKER_01But I think they do a lot of this work in the basemap processing. For this mosaic that we're doing, we really want it to line up.
SPEAKER_03Yeah, unless the vector data sets are made from the base maps.
SPEAKER_01And then sometimes they are. Sometimes they are. So you get this like, I mean, I've actually been in this situation where it's like, I didn't know what to fix, these vectors or the raster.
SPEAKER_02And so it's like,
SPEAKER_01at some point, it's like you just got to make the map, you know, and you fix one of them and you call it.
SPEAKER_03So you're shifting it around, you're looking at it, and you're doing this for each pair that you want to look at. And so when you mentioned the transform, you're talking about a shift, but like you said, it's nonlinear. Are you just picking like the best... single transform or are you splitting it up into smaller tiles so you can choose different parameters I'm not doing that level of correction
like I would say that kind of like I'm doing like kind of regional city regional corrections for this
SPEAKER_01kind of stuff like Rafa or Gaza City and so it's um you know it's a it's a large area but from a sentinel 2 standpoint it's like a spec and so yeah yeah i think these these like transform shifts that i'm doing i mean i am doing linear shifts i am i'm just approximating it and saying like i don't care about all the other places
SPEAKER_03Yeah. And do you ever, is this like a solo job or are you ever like sending it to people and asking like, Hey, how does this look? Does this look good? What do you think?
SPEAKER_01I'm just doing it solo. Yeah.
SPEAKER_03Yeah.
SPEAKER_01Yeah. yeah yeah so sounds like a lot of work it's a lot of i mean that's the thing is i think i used to be i mean the reason i wanted to talk about this talk about this is because i feel like i used to be in this mindset of like oh yeah you just plug in the high res and you're done right it's like you just plug it in like what's the big deal why isn't everybody just why aren't we just doing everything with high res it's like we have all this because it's fucking hard as hell yeah yeah yeah i mean
SPEAKER_03it That makes a lot of sense. I mean, it makes me wonder about all of these products that are based off of high-res, like Overture Maps, Buildings datasets, and things like that. I'm pretty sure they're based off of high-res.
SPEAKER_01I think high-res is one component of those, but, you know, it's OSM, and it's Microsoft Building Footprints, and it's a lot of other things. I mean, Overture's pretty good from what I've seen.
SPEAKER_03But I mean, like, the actual building footprints models. I thought that it might be high-res. I know Google's might not be, but it just seems... It just seems like doing this globally would be an absolute nightmare. I guess if you're not doing a time stack. Yeah, I think if you're doing a mosaic, yeah. But even if you're mosaicing, if the two pieces of your mosaic are like a totally different angle.
SPEAKER_01Totally. But I think... So, I think one thing we didn't talk about is that, you know, there is a true difference in some of these high-res missions and their corresponding spatial accuracy. So, you know, I think... i don't mean to knock on planet at all it's the data i use the most but i think skysat stuff is generally imaged further off nadir and so it's harder to
co-register it's harder to do time series with and stuff like maxar is just their imaging because of their particular satellites where they are in orbit i think
SPEAKER_01they're flying a little bit higher um they're typically not imaging as much oftenator from the stuff that I've seen. And so the co-registration tends to be better. Same with, like, Airbus. Yeah. And so, yeah.
SPEAKER_03What about high-res SAR?
SPEAKER_01High-res SAR. I just worked with Umbra data for the first time for a story, like, maybe a month ago. Yeah. And... it was really fascinating to look at. High-res art is, like, mind-blowing in terms of the space.
SPEAKER_03What resolution is Umbra data?
SPEAKER_01I think it's, like, you know, 30, 50. It depends on the imaging mode. 30 centimeter, 50 centimeter. Super high-res. Okay. Yeah. And... I was looking at it over Jamaica to try to do like building damage estimation. And they had all these footprints over these towns across Jamaica. They're like maybe nine or 10 different areas that they imaged across the island. And I was trying to do something fast. So as a first pass, what I did was I just, I wanted to,
SPEAKER_01You know, you can see building damage. The building damage is so obvious that you can even visually make it out in SAR imagery, even though it's harder to interpret, like these collapsed roofs. But... What I would do was I would basically just pull the overture maps vectors over these areas and see how misaligned it was. And there was only one or two places that out of the 10 or so places that were imaged where the footprint alignment to the imagery was like,
SPEAKER_01you could use it right off the bat. almost in every other situation you have had to do fairly serious co-registration fixing to make it to be able to like use a vector data set on top of it and be like these pixels within this footprint correspond to the building and is that because of the imaging angle Uh, it's a good question. In, in the Umbra case, I don't know the, I don't know the specifics.
SPEAKER_01Um, but maybe it's, even if it wasn't the imaging angle, I mean, there's the dem, there's, um, I don't know. There's, there's all these other things that come up.
SPEAKER_02Yeah. Yeah.
SPEAKER_01So, yeah, positional error of the satellite. Yeah, I should look at the metadata to figure out what the imaging angle was. But I ended up using it only over this one area, and part of my decision was because it felt usable with the building footprints.
SPEAKER_03Yep. Yeah. Because there's a speed component. Yeah, and I've looked at ISAI data in the past, and I've seen similar co-registration things.
SPEAKER_01Like, I think this is just a... I just, it's actually something I want to learn more about how to do more properly myself, which is how do you, once you get this ortho rectified product, how do you then make it hyper accurate to your particular area of interest? Like, I think, you know, I don't know if you've used Snap from ESA. I think there's tools in Snap to be able to like do this. Like people do this. It's just, it's just not something I know as much about.
SPEAKER_03Yeah. Actually, it does seem like in your line of work, it would be highly desirable to be able to do this quickly, right? Like trying to align some high-res SAR products with building footprints or like a vector data set. Yeah. Because once you know where the things are, you're just looking for a very specific signal over those things.
SPEAKER_01And often the signal is so obvious that it's like, once you kind of solve the data processing issues, the modeling bit is not complicated at all because all the information is already there.
SPEAKER_03Yeah. Yeah. It's just like putting the information in the right spot.
SPEAKER_01Yes. Yes.
SPEAKER_03Yeah. And so in the Umbra data, it was pretty obvious where building damage had occurred.
SPEAKER_01It was. And I had read a paper that had some really clear visual examples of what does... And I think the paper used Capella data. But the paper had really good examples of this is what collapsed roofs look like. It's very decorrelated... And a lot of this high-res SAR is like single band amplitude, like HH. Okay. And so that's all you have. And so it's just, yeah, it's like very obvious from a texture amplitude standpoint what
damage looks like.
SPEAKER_01But it can get complicated too. But yeah.
SPEAKER_03Yeah. Okay, so going back to the Gaza example after our little SAR detour. So you're doing all of this visually for every single pair. And are you mosaicing them? So you're doing this using GDAL and then looking at it in QGIS to align them. And then once you're done and you've got your align stack, then what do you do with it?
SPEAKER_01Well, I've just got pairs. pairs of aligned things. So what I've done is I've run models, like pixel-wise models on the aligned pairs.
SPEAKER_02Okay.
SPEAKER_01And so imagine a RGB vector... If you're, yeah, if we're thinking pixel wise, like imagine an RGB vector from the time point A, RGB vector from time point B at a, you know, hopefully co-registered pixel. And then, you know, you can calculate textural stuff on top of that and shove that into your concatenated thing. But then you can just run models on those, you know, on those stacked vectors. You can even call them embeddings if you want.
Yeah.
SPEAKER_03Just never miss an opportunity to get an embedding jab in.
SPEAKER_01But that was it. Again, I think it's blindingly simple once you've done all of it. It's just like unravel the whole thing. Let's say you had... The onion. I did say that. English is my first language. There's my defense. That's what you get when you get two immigrants talking about stuff. But yeah, just like, let's say you had pixel-wise labels for your thing you want to find and the thing
SPEAKER_01you don't want to find. You just sample those places. You grab those vectors. Shove it into a model. You do this locally? Yeah. Yeah. And then... Or you can do it in Earth Engine. I've done it in Earth Engine, too. Same thing. But yeah, you sample, you train, and then when you deploy, you unravel all your pixels over your area of interest. So you have this one by massive number of pixels. Something like an XGBoost is just going to fire through that
really fast locally.
SPEAKER_01And then you're done. And then you stitch it back together. You just ravel it back into an image. You're done. You have your probabilities, right?
SPEAKER_02Yeah.
SPEAKER_03Yeah, I mean, you make it sound so easy.
SPEAKER_01I mean, it actually... It's because it really actually is.
SPEAKER_03Well, it's funny... It's funny, like... I feel like people are so interested in like the machine learning aspects of things.
SPEAKER_00Yeah.
SPEAKER_03But if you think about the complexity of the workflow, you just like, we just spent like half an hour describing like just getting the data ready to feed to XGBoost or whatever model you want to use. And then the XGBoost bit was like, I don't know, two minutes. It's like, Then you're done. Oh, it's the least impressive, fastest, the thing you have to think the least about.
SPEAKER_01Like, insert XGBoost with Random Forest or Support Vector Machine, or, you know, dare I even say, like, logistic regression and uh i bet it works almost as well if not just as well um one thing i forgot that i have uh played around a lot with and i found to work quite well with this high-res stuff is because because you have what sky set like because you're imaging at these different times of day
SPEAKER_01let's say even within a month, right? Um, like you look at imagery from Sentinel two over October, for example, and it kind of looks like seasonally correct, right? Like the illumination looks the same every time, you know, you get this like slight seasonal shift and whatever. Um, But with SkySat, because you're imaging, and this is true with all these task missions, right? Depending on when they take an image. Because of the varying illumination conditions,
SPEAKER_01the characteristics of the color are totally different scene to scene. And so if you want a model to generalize to more than just your particular pair at that particular point, from time A to time B. Like, let's say you wanted to use the same model for all of Gaza for any pairwise combination. I think that's a reasonable thing to want to have, right?
SPEAKER_01You need to account for those. You either need to, A, account for those shifts in color up front from the data side, or you have to sample through it from the training side. So you have to either sample through a ton of different time points to try to capture all these illumination conditions, or you just have to do it up front, I think. And maybe there's another way to do it that I am not thinking about.
SPEAKER_03Maybe a foundation model? Maybe a foundation model would just do that for you, because it's been trained on the world.
SPEAKER_01Yeah, maybe, actually.
SPEAKER_03Actually, maybe this isn't the dumbest... Anyway...
SPEAKER_01Okay, no, hold up. Tell me about how a foundation model solves this. I'm curious. Well,
SPEAKER_03I guess if you pre-train... I mean, I guess the foundation model maybe would solve this in the same way the sampling method that you described would. Like, it's seen enough variability... in pre-training that it's less bothered by that than by the actual texture you know like a texture versus color kind of thing so it's seen lots of different colors but the textures kind of remain the same like the statistical
distribution of the
SPEAKER_03spatial patterns. And so maybe there is a part of that model that could learn this and then be more resilient to changes in illumination or color than a naive model would. There was a lot of maybes in that sentence.
SPEAKER_01Yeah, maybe it'll just work as soon as you just prompt it, you know? Boom. Well,
SPEAKER_03I guess the thing is, like, if you knew how to solve that problem in pre-training, then you would kind of know how to solve that problem without pre-training. Sure, sure. And then why would you pre-train? you would just solve the problem.
SPEAKER_01Fair enough, fair enough. Yeah, but you know, I'm an idiot. I don't know how to do any of that stuff. So in my worldview, it's like you solve it up front or you sample through it after the fact. And so I actually just solve it up front. And so I have started doing this with like all the SkySat data that I work with, at least from a modeling standpoint, is what I do is I I always correct it. I correct the RGB bands.
I do like a histogram fit from the SkySat data to what Sentinel-2 looks like at
SPEAKER_01that time period. So I do a histogram match of the RGB values from sensor A at illumination time X to sensor B at a consistent illumination time. And so I like fake, I like kind of fake the RGB data to always look like Sentinel-2.
SPEAKER_03Is there a reason you don't match it to one sky set image?
SPEAKER_01I guess I could match it to one SkySat image. I'm not sure if that matters from a modeling standpoint, but yeah, I guess that's a good point. I guess you could match it to just one SkySat image. Yeah.
SPEAKER_03Yeah, like have a base image, basically, or something like that. Or one Sentinel image, if you want it.
SPEAKER_01Yeah, yeah. But it doesn't feel fair to match it to one Sentinel image, because I still want to capture the seasonal variation. Right. So that's why that was my rationale for being like, I want to match it to the seasonally consistent Sentinel-2 acquisition. So what I do is I calculate a composite from within like a... Gaza is not very cloudy at all. So you just need like two weeks of Sentinel-2 around a date. You know, calculate your median composite or mid-oid or pick your
favorite.
SPEAKER_01And I just... I just do the histogram matching. I actually do it in Earth Engine. And what that does is it just gives me really consistent looking data. So then my model kind of knows what to expect, too. I don't know.
SPEAKER_03Who knows if it's the right thing to do? But that's the thing, is if you're visually checking, then you kind of know that it's working.
SPEAKER_01Yeah, sure.
SPEAKER_03Right? No, that's how you know.
SPEAKER_01But, you know, if you didn't do any of this, you can still visually make out the things you want to in all these. Did you try without it? I've tried not doing any of this, and then the model doesn't generalize well. um probably because my model is so simplistic i think the other way you can tackle this is is you know kind of like your foundation model comment but it's like you can just tackle it from model complexity too yeah but yeah it's an interesting question i don't know what the best way to handle that is okay so
SPEAKER_03So wait, walk me through this process. So you, I guess the first thing you tried is doing it without the histogram match.
SPEAKER_01Yeah. So first off, if you just care about time A, time B, run a model, you don't care at all. Like you can, you can overfit your model and you don't care about it generalizing and you don't have to do any of this and you're done. yeah and if you do care about it generalizing or if you're mosaicing across a week's worth of data you know then you start caring and so then you have to decide where to solve this yeah and so so you ran it and it worked well for that scene and then you ran it on a different pair yes a different pair and
you're like oh
SPEAKER_03The performance is definitely degraded on this pair.
SPEAKER_01Yeah, seriously degraded. And it's because it's like things look bright in a different way in RGB space depending on the illumination.
SPEAKER_03Yeah. And your histogram matching each scene, yeah, that makes total sense. And so then you tried, at that point, you were thinking, okay, how can I make this generalized better? I could go and relabel data in the new... pair, but then I have to go and relabel data in every pair. Or a lot of pairs. Or a lot of pairs. Or I can try this histogram matching thing, you try that, and then it appeared to just generalize
SPEAKER_03Well, off of that.
SPEAKER_01Or better, yeah. I still need kind of seasonal labels if I want it to generalize across time.
SPEAKER_03So did you go and generate more labels?
SPEAKER_01Yeah. So, I mean, it's kind of a multi-pronged effort. And this thing, this kind of work evolved over time. So it started out as me doing none of this and just... doing a local co-registration fix, doing one time pair, getting something working. That was enough at one point. And then as we got more ambitious and wanted to do more, it's like we had to do more and more of this upfront or have systems to do more of it in a more automated way. And so that's how I kind of built this thing out is like, yeah, step by step.
SPEAKER_03Gotcha. And so when you're relabeling, when you're labeling new data, when do you stop? How do you decide, all right, that's enough. I should try something now. um i don't know i usually spend about an hour and i'm like this looks good you know you can you can do a couple hundred a couple hundred easy for each maybe more for each class i was only solving binary classification problems but um yeah you know
SPEAKER_01you're doing this in qgis yeah i've been 11 qgis Yeah, especially with high res. It's like, I actually have migrated a lot of my stuff to Earth Engine. But in terms of labeling, core registration stuff. Yeah, I still use QGIS for that.
SPEAKER_03Yeah. What stuff have you migrated to Earth Engine? I mean, I guess the histogram match is already in there.
SPEAKER_01Yeah, the histogram match I do in Earth Engine, I've migrated the model entirely into Earth Engine as the data volume has become higher and higher. You asked, are you doing this all locally? I started doing it all locally. And then as soon as I was dealing with a four gigabyte TIFF at this point, and then that was compounding and compounding, it's like the local stuff starts falling over. So Earth Engine scales really nicely for stuff like this.
SPEAKER_03Yeah, so you're just doing like the random forest.
SPEAKER_01Yeah.
SPEAKER_03In Earth Engine. Exactly. And you're outputting probabilities?
SPEAKER_01Outputting probabilities. I do a post-process, the typical stuff, median filters, vectorization.
SPEAKER_03Are you tuning the probability as well? Are you like a thresholding to make the detections? Exactly. You're kind of just looking at it and being like, all right. Because I have all this post-processing to remove what I know are false areas.
SPEAKER_01Yeah. We've talked about this a bunch before. It's like, do you solve it at the model stage or do you solve it in the post-processing stage? And so I've got all these heuristics that are hyper-specific to my specific problem and the And the particular land cover and geography in Gaza where it's like I have these heuristic rules about how to handle building shadows or shadow misalignments, how to handle false detections in these open areas where
there's nobody and stuff
SPEAKER_01like that.
SPEAKER_03Yeah. Here's a question. When you look at the probabilities, like the deployed ones, do you find... I feel like I often find that they're scaled poorly. Like the classifier is trying to learn 0.5, but it's never 0.5. In fact, often I find my... choose a higher probability threshold. And I don't know if that's... I mean,
SPEAKER_03so I looked into this and there's some, like, probability calibration methods that you can do, like, post-training. But I just wonder if... Have you noticed that as well? Or, like, 0.5 usually around where you're sitting?
SPEAKER_01I'm actually... Usually setting kind of around 0.5. And honestly, I set it lower before to gain a little bit of sensitivity. Because I was so confident in some of my post-processing methods. that I knew that I would beat down extra noise easily. Right. Yeah, yeah, yeah. You know, and like this problem that I have solved many times is like this tent detection problem. And so there's certain ways,
and sensitivity is nice because what you end up capturing is kind of the edges of
SPEAKER_01these tents. As opposed to just the, you know, sometimes these one-pixel centroids. Like, these aren't big. And so more sensitivity is really, really nice. And during this labeling process, you know, the thing you're trying to label for is where do tents show up. Mm-hmm. throughout the conflict tents have showed up kind of everywhere. They've showed up in open fields. They've showed up on top of sand near the beach. They've showed up on top of rubble. They showed up in the middle of a road.
And so there's all these possible types of land cover where the change can take place.
SPEAKER_01And so actually the model's learning a fairly complex, you know, it's not a, it's not a totally trivial problem. And so, um, So I think I've found that setting that threshold kind of lower actually has helped me many times.
SPEAKER_03Interesting.
SPEAKER_01Yeah. Yeah. But I agree with you that the probabilities don't seem to be scaled well. I feel like I have seen that before, where they seem kind of bunched in these different groups of values. Yeah. yeah yeah that's and i guess it's that's specific to like we can get away with it because in mapping we're still trying to make like the vector or the thresholded predictions and we're doing it manually but i guess people people who do real machine learning really need to worry about these probabilities
being scaled well
SPEAKER_01i'm definitely not doing real machine learning Yeah, that's my high-res tirade.
SPEAKER_03Yeah, well, thank you for sharing. And also, I guess we had a couple questions. We did? No kidding. No, no, no. I was just going to say during the... If anyone listening has made a high-res basemap, we would like to hear from you and hear about the process, I guess. I would be interested to know how that went.
Relevant links:Carbon Plan Open Climate Risk A Risk Professional’s Guide to Physical Risk AssessmentsClimate Risk Companies Don’t Always AgreeClimate Services: The Business of Physical Risk(00:00) Chris Struggles to...
I flew to the East Coast and drank a beer with Krishna.(00:00) Sick New Jingle (00:20) Double IPA (01:20) The Gang Struggles to Define a Platform: Metadata, Storage, Compute, APIs (11:20) The Value of a Platform (16:00)...
(00:00) Time series, Landtrendr, New Mexico, Cuba. Is medium/low-resolution imagery underrated? (15:00) Bayesian Deforestation Detection, operation-oriented algorithms and platforms (27:00) Landtrendr in the West Bank,...
No pre-prepared discussion subject this time, we just winged it. (00:00) Imagine useful geospatial models, it’s easy if you try. (08:00) Academic papers, life at the paper mill, distilled .pub for geospatial. (24:30)...
Warning: we swore a little in this one, if that’s the kind of thing that offends you I recommend you don’t listen! This episode was about failures: that sinking feeling you get when a project just isn’t working out....