Latest / Satellite image deep learning / TorchGeo 1.0 with Adam Stewart
Transcript
- 0:05SPEAKER_00: Adam, welcome to the podcast.
- 0:07SPEAKER_00: Yep, thanks for having me.
- 0:08SPEAKER_00: This is something that we've been talking about for a very long time,
- 0:11SPEAKER_00: and I'm glad we finally made it happen.
- 0:13SPEAKER_03: Yeah, and unbelievably, it's your first ever podcast.
- 0:16SPEAKER_03: I'm quite thrilled to have you on board.
- 0:17SPEAKER_00: First ever podcast.
- 0:17SPEAKER_00: Thanks for having me.
- 0:19SPEAKER_03: Pleasure.
- 0:19SPEAKER_03: All right, let's begin with where you work and what you do.
- 0:22SPEAKER_00: Yeah,
- 0:22SPEAKER_00: so I'm a postdoctoral researcher at the Technical University of Munich,
- 0:26SPEAKER_00: and I'm also the author of Torch Geo.
- 0:29So most of my time is kind of managing geospatial software
- 0:33libraries for machine learning.
- 0:34And for people that aren't so familiar with Torch Geo,
- 0:37what's the elevator pitch?
- 0:39So if you're familiar with Torch Vision,
- 0:42it's the same thing for satellite imagery.
- 0:45SPEAKER_00: If you're not familiar with Torch Vision,
- 0:48SPEAKER_00: basically in the PyTorch ecosystem,
- 0:51SPEAKER_00: you have PyTorch itself,
- 0:52SPEAKER_00: which has all the basic building blocks you need for deep learning.
- 0:56Torchgeo is all of the high-level abstractions specific to
- 1:00geospatial data.
- 1:01SPEAKER_00: So the data loaders,
- 1:02SPEAKER_00: the foundation models,
- 1:05SPEAKER_00: transforms,
- 1:07SPEAKER_00: and PyTorch Lightning modules for actually using all of these things in
- 1:10SPEAKER_00: combination.
- 1:12SPEAKER_03: Right.
- 1:12SPEAKER_03: So it basically is the toolkit you need to work with geospatial,
- 1:16SPEAKER_03: handles all those geospatial specifics,
- 1:19SPEAKER_03: enables you to do things like just load datasets,
- 1:22SPEAKER_03: train models.
- 1:23SPEAKER_03: Have I missed anything there?
- 1:25SPEAKER_00: And a lot of people ask, why can't I just use TorchVision?
- 1:28SPEAKER_00: It's all images.
- 1:30SPEAKER_00: You know,
- 1:30SPEAKER_00: TorchGeo is really designed for things like multispectral images,
- 1:34SPEAKER_00: hyperspectral images,
- 1:35which don't have three bands and don't work with TorchVision
- 1:40transforms or don't
- 1:41SPEAKER_00: work with TorchVision models.
- 1:43So it's really hyper focused on these kind of obscure image
- 1:48data sets where you
- 1:49SPEAKER_00: have to deal with things like projection and resampling,
- 1:52SPEAKER_00: aligning to
- 1:54raster and vector data sets automatically rasterizing a vector
- 1:58data set so there's
- 1:59a lot of complexity in geospatial data that doesn't exist in
- 2:02typical image data
- 2:03sets yeah those people don't know how lucky they are yeah all
- 2:06right and it's a very
- 2:08SPEAKER_03: popular project i mean what are the stats at the moment
- 2:11yeah so as far as i know it's i think it's safe to say it's the
- 2:15most popular
- 2:16geospatial machine learning library so there's three and a half
- 2:20thousand stars um
- 2:22over a hundred contributors from around the world we've had
- 2:25about half a million
- 2:26downloads in total since the project started so yeah it's been
- 2:30quite successful
- 2:31much more successful than i think any of us expected that's
- 2:33great to hear and
- 2:35recently there's been a few key updates maybe we want to just
- 2:37fire through some of
- 2:38SPEAKER_03: those
- 2:39SPEAKER_00: Yeah,
- 2:40SPEAKER_00: so as of yesterday,
- 2:42SPEAKER_00: at the time of this recording,
- 2:43SPEAKER_00: we just announced the Torchgeo organization.
- 2:46SPEAKER_00: So this is something we've been working on for over a year now.
- 2:52SPEAKER_00: Basically,
- 2:53SPEAKER_00: when Torchgeo started four years ago,
- 2:55it started off as my intern project at the AI for Good Research
- 3:00Lab at Microsoft.
- 3:02SPEAKER_00: And we made it open source.
- 3:04SPEAKER_00: We thought it'd be useful for the community.
- 3:06And we were actually really surprised that it turned out to be
- 3:08very useful for the community.
- 3:09A lot of people picked it up,
- 3:11started using it,
- 3:12started building other libraries on top of it.
- 3:16SPEAKER_00: And with all of that,
- 3:17SPEAKER_00: with the kind of competition over who has the best foundation models,
- 3:22SPEAKER_00: who has the best software libraries,
- 3:24SPEAKER_00: we've noticed there's a lot more competition than collaboration.
- 3:27SPEAKER_00: And one of the things that we wanted to do was make Torchgeo
- 3:32SPEAKER_00: even more open.
- 3:34SPEAKER_00: So it's already open source under an MIT license.
- 3:37We wanted to also have open and independent governance so that
- 3:40it no longer belongs
- 3:41SPEAKER_00: to Microsoft,
- 3:43SPEAKER_00: it belongs to all of you,
- 3:44SPEAKER_00: the Torchgeo contributors.
- 3:46SPEAKER_00: So this is something that took a very long time.
- 3:49Obviously there's a lot of people at different levels of
- 3:51Microsoft who need to
- 3:52SPEAKER_00: approve this,
- 3:53SPEAKER_00: different lawyers we need to talk to.
- 3:56SPEAKER_00: It was actually Microsoft's idea to set up this governance panel.
- 4:01So they suggested this minimal viable governance model that
- 4:04GitHub published,
- 4:07SPEAKER_00: and we decided to adopt that,
- 4:08SPEAKER_00: made a few changes here and there,
- 4:10SPEAKER_00: but otherwise set things up.
- 4:13SPEAKER_00: So there's two different things to be aware of.
- 4:17SPEAKER_00: There's the TorchGeo organization, which governs the TorchGeo project.
- 4:22SPEAKER_00: The Torchgeo organization is led by the Technical Steering Committee.
- 4:28SPEAKER_00: Currently, we have six people.
- 4:29SPEAKER_00: So there's me and Niels from Toom.
- 4:32SPEAKER_00: There's Caleb and Anthony from Microsoft.
- 4:36SPEAKER_00: And then there's Isaac from Werobots and Ashwin from Space42.
- 4:40So these are the people currently leading the entire Torchgeo
- 4:43organization.
- 4:45And then approximately the same set of people is also the
- 4:48maintainers of the Python
- 4:50SPEAKER_00: library itself.
- 4:52SPEAKER_00: There's a lot of other reasons we wanted to do this.
- 4:54So Torch Geo itself,
- 4:57the Python library,
- 4:59is not the only thing that we manage.
- 5:01SPEAKER_00: So we also have a Hugging Face community,
- 5:04SPEAKER_00: a Zenodo community,
- 5:05SPEAKER_00: where we upload data sets and models.
- 5:08We have our Slack workspace,
- 5:10obviously,
- 5:10where we have a code of conduct that we need to enforce.
- 5:14And we would also like to grow the Torch Geo organization to
- 5:17have multiple projects
- 5:18SPEAKER_00: in the future.
- 5:23SPEAKER_00: medium range future,
- 5:25I'm managing a few master's students who are actually working
- 5:29on GIS integration
- 5:31SPEAKER_00: for TorchGeo.
- 5:32So imagine loading up QGIS or ArcGIS and chatting with a vision
- 5:37language foundation
- 5:38SPEAKER_00: model and using it to automatically label your satellite imagery for you.
- 5:43SPEAKER_00: So that's something that's coming probably in the one year timeframe-ish,
- 5:49SPEAKER_00: long after all of the other stuff we're actively working on right now.
- 5:54SPEAKER_00: So that would also be something that they would govern.
- 5:58SPEAKER_00: So the current technical steering committee is those six people.
- 6:01SPEAKER_00: We do want to grow this in the future.
- 6:03SPEAKER_00: So if any of you are wondering, how can I take part?
- 6:07especially other libraries that are built on top of Torchgeo
- 6:10who want to have some
- 6:11SPEAKER_00: sort of say in backwards incompatible changes or release schedules.
- 6:17SPEAKER_00: It's quite easy to join all of our technical steering committee meetings.
- 6:21SPEAKER_00: They're all open to the public.
- 6:22Just join the Slack workspace and join the technical steering
- 6:26committee channel.
- 6:28In terms of actually onboarding people onto the technical
- 6:31steering committee,
- 6:32SPEAKER_00: we'll probably start slow and onboard more people one at a time,
- 6:36but we do actually want to grow the technical steering
- 6:40committee to have more
- 6:41SPEAKER_00: diverse leadership.
- 6:43SPEAKER_00: So we've got people from big tech companies and startups.
- 6:46SPEAKER_00: We've got people from academia.
- 6:48SPEAKER_00: We're really missing people from government labs.
- 6:52SPEAKER_00: So we would love to have people from NASA,
- 6:55SPEAKER_00: ESA,
- 6:55SPEAKER_00: DLR,
- 6:56SPEAKER_00: USGS,
- 6:57SPEAKER_00: NOAA,
- 6:57all of these other government agencies that actually provide
- 7:00the data and provide a
- 7:02SPEAKER_00: lot of the expertise for pre-processing and using the data.
- 7:05SPEAKER_00: We would love to have them as partners as well.
- 7:09It sounds like it's really setting the foundation for the
- 7:12future development
- 7:14SPEAKER_03: objectives and also just broadening the sort of engagement.
- 7:18SPEAKER_00: Yeah, exactly.
- 7:19SPEAKER_00: I mean,
- 7:19SPEAKER_00: if you think of it this way,
- 7:21SPEAKER_00: I do a lot of research on satellite imagery for agriculture.
- 7:27SPEAKER_00: And if it was only me making decisions,
- 7:29SPEAKER_00: we would only have agriculture datasets,
- 7:31SPEAKER_00: only have agriculture models.
- 7:33SPEAKER_00: But the more people we have from different application domains,
- 7:37SPEAKER_00: different experience levels,
- 7:39people who are only computer scientists who don't understand
- 7:42anything about
- 7:43SPEAKER_00: satellite imagery,
- 7:44people who are only remote sensing experts who don't know any
- 7:47machine learning.
- 7:48If you don't have a more diverse community leading things,
- 7:51you end up with
- 7:52documentation that only works for one audience or features that
- 7:56only cater to one audience.
- 7:57SPEAKER_03: Absolutely.
- 7:58SPEAKER_03: And is the provisional plan to have meetings periodically?
- 8:02SPEAKER_03: What do the committee actually do then?
- 8:03SPEAKER_00: Yeah, we'll have meetings once a month.
- 8:05It will probably be the first Monday of the month at 6pm
- 8:09Central European time.
- 8:11I think next month we're going to shift by a week just because
- 8:15of Labor Day in the US.
- 8:16SPEAKER_00: But other than that, yeah, we want to meet every month.
- 8:19SPEAKER_00: We want to have it open to the public.
- 8:20SPEAKER_00: Everyone should come and join and
- 8:22Just chime in and say,
- 8:23hey,
- 8:24I'm using Torch Geo,
- 8:25but this feature isn't working for me.
- 8:27SPEAKER_00: Or why don't you have this feature?
- 8:28SPEAKER_00: Or I'm interested in actually contributing.
- 8:31SPEAKER_00: How do I get started?
- 8:32SPEAKER_00: What do you need?
- 8:34SPEAKER_00: Questions like that are always open.
- 8:37SPEAKER_03: Okay, not long to go to that first meeting.
- 8:40SPEAKER_03: There's also some other changes coming.
- 8:44SPEAKER_00: Yes,
- 8:44SPEAKER_00: the biggest thing that we've been working on,
- 8:46SPEAKER_00: and this is also almost a year in the making,
- 8:49SPEAKER_00: I think we started pretty heavily in October.
- 8:52We really looked at the features that Torchgeo has and looked
- 8:57at the stability of
- 8:57SPEAKER_00: Torchgeo and we said,
- 8:59SPEAKER_00: Things are starting to stabilize,
- 9:01SPEAKER_00: especially as other software libraries build on top of Torchgeo.
- 9:04SPEAKER_00: They want some guarantee of backwards compatibility.
- 9:07SPEAKER_00: They want more deprecation cycles long term.
- 9:12So they want something close to a Torchgeo 1.0 release where we
- 9:16can guarantee some
- 9:17SPEAKER_00: level of stability.
- 9:19In terms of the features that we already have,
- 9:21we have most of the things that we want.
- 9:24But I think the one major feature that we're still missing is
- 9:28complete time series support.
- 9:31This is something that is lacking in almost all GeoML libraries
- 9:35at the moment.
- 9:36SPEAKER_00: I think the only shining example would be SITs from the R ecosystem,
- 9:40where they're basically focused solely on time series support
- 9:44and very good time
- 9:44SPEAKER_00: series support.
- 9:46So we tried to take inspiration from SITS and other libraries
- 9:49that have tried to do
- 9:50time series support and looked at how we could integrate it
- 9:53into Torchgeo.
- 9:55When I mentioned time series support,
- 9:57I'm talking about many different things.
- 9:59SPEAKER_00: So there's 1D time series support.
- 10:02So imagine you're working with a weather station or an air
- 10:07pollution sensor,
- 10:08and you want to forecast future levels of air pollution at that
- 10:11specific location.
- 10:12SPEAKER_00: So that would be the 1D example.
- 10:15In terms of 2D,
- 10:16TorchGeo has always done 2D,
- 10:18so that's quite well covered.
- 10:20SPEAKER_00: But we also want to support 3D.
- 10:22So imagine you have a location that's been damaged by some sort
- 10:28of natural disaster
- 10:29SPEAKER_00: or by warfare,
- 10:30SPEAKER_00: and you want to do change detection.
- 10:32SPEAKER_00: So you have two timestamps for one location,
- 10:35SPEAKER_00: two images before and after,
- 10:37SPEAKER_00: and you want to label damaged buildings or...
- 10:40SPEAKER_00: places that you should target for recovery.
- 10:43But also moving beyond the two timestamp,
- 10:45we want to support multiple timestamps.
- 10:47SPEAKER_00: So let's say you're doing something like crop type mapping,
- 10:50SPEAKER_00: where you've got an entire year's worth of Sentinel-2 imagery,
- 10:54SPEAKER_00: and you actually want to take advantage of both the time dimension,
- 10:57SPEAKER_00: but also the spatial dimension.
- 10:59SPEAKER_00: So that's the 3D case.
- 11:01SPEAKER_00: And then there's also the 4D case,
- 11:03SPEAKER_00: which is becoming more and more popular,
- 11:04SPEAKER_00: where you're targeting things like medium range weather forecasting,
- 11:08SPEAKER_00: now casting,
- 11:09SPEAKER_00: even decadal scale climate modeling.
- 11:13So here you have the X and Y dimension,
- 11:15but also the Z dimension for altitude.
- 11:18SPEAKER_00: and then, of course, the time dimension as well.
- 11:20SPEAKER_00: All of these are covered under time series support.
- 11:24We actually chose these specific applications to really
- 11:27highlight the fact that
- 11:28SPEAKER_00: TorchGEO is not only for satellite imagery.
- 11:31SPEAKER_00: Obviously,
- 11:31SPEAKER_00: most of the datasets,
- 11:32SPEAKER_00: most of the features that we add are targeted towards satellite imagery.
- 11:36SPEAKER_00: But we just merged our first weather forecasting model.
- 11:40We have many data sets for point data and a lot of other very
- 11:44interesting applications.
- 11:46SPEAKER_00: So that's everything that's covered.
- 11:48SPEAKER_00: Again, this is something we've been working on since last October.
- 11:52So there's a lot more work involved in this than any of us
- 11:55really expected.
- 11:57I started looking at some of the backend design of Torchgeo
- 12:01that I came up with
- 12:02SPEAKER_00: four years ago,
- 12:02SPEAKER_00: and I was like,
- 12:03SPEAKER_00: why did I do it this way?
- 12:04SPEAKER_00: This is so inflexible.
- 12:06SPEAKER_00: It's just not practical.
- 12:08So,
- 12:08for example,
- 12:09we used to use Archery for all of our spatiotemporal indexing.
- 12:13So we did keep track of the spatio-temporal bounding boxes of
- 12:17all of our files so
- 12:19SPEAKER_00: that we could sample them quickly and efficiently.
- 12:23The problem with that is that our tree lacks a lot of features
- 12:28that we need.
- 12:28For example,
- 12:29we want to be able to separately index space or time,
- 12:33not both at the same time.
- 12:35SPEAKER_00: So we did a very long and intensive,
- 12:39SPEAKER_00: basically,
- 12:40SPEAKER_00: software literature review on all the options available to us.
- 12:43SPEAKER_00: We looked at Artree,
- 12:44SPEAKER_00: we looked at Shapely's STR tree,
- 12:47SPEAKER_00: we looked at Geopandas,
- 12:48and then we also looked at the Stack ecosystem and tried to
- 12:52find something that was
- 12:53SPEAKER_00: a little bit more flexible,
- 12:54SPEAKER_00: more powerful,
- 12:55SPEAKER_00: and had a lot more features that we could use for this.
- 12:58SPEAKER_00: So we ended up switching to Geopandas.
- 13:00So I basically had to rewrite every single geodataset and
- 13:03geosampler from scratch
- 13:04SPEAKER_00: to work with Geopandas.
- 13:07SPEAKER_00: At the same time,
- 13:08SPEAKER_00: we're also looking at the data loaders,
- 13:10SPEAKER_00: how they load the data,
- 13:11SPEAKER_00: what data they're able to load.
- 13:13SPEAKER_00: We previously used RasterIO for all data loading.
- 13:16And RasterIO is great because it wraps around GDAL and anything
- 13:19that GDAL can read,
- 13:20SPEAKER_00: Torch Geo can read.
- 13:22But there's a lot of things that we want to be able to read
- 13:25that aren't in that list.
- 13:27So,
- 13:27for example,
- 13:28a lot of the weather and climate data is stored in NetCDF,
- 13:33HDF5.
- 13:34Technically,
- 13:35GDAL can read these things,
- 13:36but not the version that's on PyPy.
- 13:39So we started looking more and more at X-Array and at the
- 13:42moment I'm working on a
- 13:43pull request to actually replace RasterIO with Rio X-Array so
- 13:48that we can load
- 13:49SPEAKER_00: anything that RasterIO can load,
- 13:51SPEAKER_00: anything that NetCDF or HDF5 can load.
- 13:56SPEAKER_00: And have a little bit more flexibility.
- 13:59We're also planning on replacing Fiona with Geopandas so that
- 14:02we can drop some of
- 14:03SPEAKER_00: these dependencies that we no longer directly rely on.
- 14:06They become indirect dependencies where there's higher level
- 14:09libraries that wrap those instead.
- 14:11SPEAKER_00: Yeah.
- 14:12SPEAKER_00: So this will also help a lot for scalability.
- 14:16Things like Geopandas and Rio X-Ray have really good
- 14:18integration with Dask.
- 14:19SPEAKER_00: You can very easily parallelize them.
- 14:21SPEAKER_00: They scale up quite well.
- 14:23So there's a lot of very big backend changes that are very
- 14:26backwards and compatible.
- 14:27That's another reason why we wanted to make this 1.0 release
- 14:30where we say,
- 14:31SPEAKER_00: hey,
- 14:32SPEAKER_00: we're changing the major version number.
- 14:33SPEAKER_00: This is a very big change.
- 14:35SPEAKER_00: Expect things to break.
- 14:37We will be making release candidates before we make the
- 14:40official release so that
- 14:41people can test them and make sure everything is ready to go
- 14:44for the official
- 14:46SPEAKER_00: release.
- 14:47But basically everything related to geodataset and geosampler
- 14:51is probably going to break.
- 14:53SPEAKER_00: The rest of the library doesn't change so much.
- 14:55SPEAKER_00: It should be mostly backwards compatible.
- 14:58SPEAKER_00: We're also adding a lot of new features.
- 15:00SPEAKER_00: So for example, we just merged a new change detection trainer.
- 15:05So you can do binary multi-class and multi-label change
- 15:08detection now with TorchGeo.
- 15:10We've got a bunch of change detection models that we already
- 15:13have integrated with
- 15:14SPEAKER_00: that and we're expecting to add more as well.
- 15:17And we're working on an autoregression trainer that you can
- 15:19plug in for things like
- 15:20SPEAKER_00: air pollution forecasting or weather forecasting,
- 15:24SPEAKER_00: where you can integrate all these existing foundation models.
- 15:27SPEAKER_03: Wow, it's a really exciting set of features.
- 15:29SPEAKER_03: And I think, as you mentioned, kind of unique in the ecosystem as well.
- 15:34So it's partly about features,
- 15:36but also about saying now the foundations are there.
- 15:40SPEAKER_03: This is 1.0, and we're going to make some backward compatibility changes
- 15:44breaks but also guarantees for the future it's interesting i
- 15:48think i i talked to
- 15:49some of the folks from um pie torch lightning for example and
- 15:52one of their
- 15:53SPEAKER_00: philosophies was you know get your software to a point where it's stable
- 15:58SPEAKER_00: And then move on to the next big thing.
- 16:00SPEAKER_00: And Torchgeo is not going away.
- 16:02SPEAKER_00: We're going to continue to maintain it for the long term future.
- 16:05There's a lot of other features that we do want to add in the
- 16:07near future,
- 16:08SPEAKER_00: things like stack integration,
- 16:10SPEAKER_00: that they're not necessarily backwards incompatible,
- 16:13SPEAKER_00: but they're much needed features.
- 16:15SPEAKER_00: But we wanted to get it to a point where it's relatively stable.
- 16:18SPEAKER_00: where I as the main developer can take a step back and say,
- 16:22SPEAKER_00: I'm going to review PRs,
- 16:24but I want the community to really lead these PRs and do a lot
- 16:28of the work.
- 16:29SPEAKER_00: And while that's happening,
- 16:31SPEAKER_00: I can explore new things and say,
- 16:33SPEAKER_00: I want to target GIS integration for this low-code,
- 16:36SPEAKER_00: no-code environment for non-computer science experts.
- 16:40SPEAKER_00: This is one of the things that we've gotten a lot of
- 16:43know kind of i wouldn't say criticism but but jokes about where
- 16:48torch geo is the
- 16:49best library ever for a machine learning expert but for a
- 16:53remote sensing expert
- 16:54there's a lot of things in torch geo that are still quite hard
- 16:57to to wrap your head
- 16:58around what is a geo sampler why would i need it what is a
- 17:02pytorch data loader what
- 17:03SPEAKER_00: is pytorch lightning why do i have to learn all these new things
- 17:06SPEAKER_00: in order to do machine learning on data.
- 17:09SPEAKER_00: It's obviously much more complex than a simple scikit-learn workflow.
- 17:13So we wanted to take a lot of the abstractions that we have
- 17:16with PyTorch Lightning
- 17:18SPEAKER_00: and bring those to the remote sensing audience in a way that's much more
- 17:21SPEAKER_00: accessible.
- 17:23SPEAKER_00: Exciting.
- 17:24You briefly mentioned that Torchgeo is built upon by a few
- 17:28other libraries.
- 17:28Do you want to just list some of those and maybe talk about how
- 17:31it relates?
- 17:32Yeah,
- 17:32so the big one that I think a lot of people know about is
- 17:34TerraTorch.
- 17:35SPEAKER_00: But one that actually has even more stars is Geo AI.
- 17:39And then also the GeoBench benchmarking suite uses Torchgeo to
- 17:44curate many of its data sets.
- 17:46SPEAKER_00: Mm-hmm.
- 17:47SPEAKER_00: NASA's PyTorch Caney uses Torch Geo a little bit for data loading.
- 17:51So there's a lot of different organizations that are building
- 17:53on top of Torch Geo.
- 17:56One of the reasons we wanted this independent governance is so
- 17:59that it's easier for
- 18:00SPEAKER_00: those people to build on top of Torch Geo,
- 18:02but also we would love those people to join the technical
- 18:05steering committee
- 18:06meetings and eventually join the official technical steering
- 18:09committee board.
- 18:11SPEAKER_00: So we would love folks from NASA,
- 18:12SPEAKER_00: from IBM,
- 18:13from all of these other different institutions to join and help
- 18:17kind of drive the
- 18:18SPEAKER_00: future directions of Torchgeo so that we can collaborate.
- 18:22SPEAKER_00: We're not reinventing the wheel.
- 18:25SPEAKER_00: For example,
- 18:25SPEAKER_00: TerraTorch has a bunch of data loaders,
- 18:27SPEAKER_00: but what they really shine at is building on top of Torchgeo,
- 18:30SPEAKER_00: adding these higher level abstractions for...
- 18:34basically building a foundation model playground where you can
- 18:36fine tune and
- 18:38evaluate your foundation models much more easily than you can
- 18:42directly in Torchgeo.
- 18:43So we would love to take some of the more experimental features
- 18:47that TerraTorch has
- 18:48SPEAKER_00: and integrate them more directly into Torchgeo,
- 18:51but also offload many of the things that they don't want to
- 18:54maintain themselves so
- 18:56SPEAKER_00: that when there's big backwards incompatible changes to the data loaders,
- 19:00SPEAKER_00: we fix them,
- 19:01SPEAKER_00: not them.
- 19:03SPEAKER_03: Right.
- 19:03SPEAKER_03: So coordination will definitely benefit all parties there.
- 19:08One topic that's getting a lot of interest at the moment is
- 19:10foundational models.
- 19:11And I think I've seen an increasing number of foundational
- 19:13models being supported in Torchgeo.
- 19:15SPEAKER_03: What's your take on foundational models?
- 19:17SPEAKER_00: Yeah, so I'm obviously biased because I'm a foundation model researcher.
- 19:21So I've been involved in quite a lot of foundation model
- 19:24projects over the years.
- 19:26SPEAKER_00: The first one I got started with was SSL4EO Landsat,
- 19:29which was really the first foundation models ever pre-trained
- 19:34on Landsat imagery
- 19:36SPEAKER_00: and the largest Landsat pre-training data set ever created,
- 19:39SPEAKER_00: and I think maybe still to this day.
- 19:42SPEAKER_00: So we created 5 million Landsat images for Landsats 4 through 9.
- 19:47SPEAKER_00: We had several different foundation models of different ResNet and vision
- 19:52SPEAKER_00: transformer backbones,
- 19:54SPEAKER_00: different SSL techniques,
- 19:55SPEAKER_00: different generations of Landsat satellites,
- 19:59SPEAKER_00: different surface on top of atmosphere products.
- 20:02SPEAKER_00: We basically had 40 foundation models for Landsat.
- 20:05SPEAKER_00: And one of the things that reviewers said was,
- 20:08SPEAKER_00: What's the point of 4D foundation model?
- 20:10SPEAKER_00: Shouldn't you just have one foundation model?
- 20:12SPEAKER_00: Isn't that the definition?
- 20:14SPEAKER_00: And back in that time,
- 20:15foundation model was really just a big buzzword for any large
- 20:19model trained on a
- 20:20SPEAKER_00: lot of data,
- 20:20SPEAKER_00: usually using self-supervision.
- 20:24SPEAKER_00: When I joined the Technical University of Munich,
- 20:27one of the things that I wanted to do was we've got a lot of
- 20:31foundation models for
- 20:32SPEAKER_00: Sentinel-1 and 2.
- 20:34SPEAKER_00: We now have some for Landsat.
- 20:37There's still thousands of other satellites out there that
- 20:39we're not covering.
- 20:40We really want foundation models for every satellite,
- 20:43not just the most popular ones.
- 20:45SPEAKER_00: Yeah.
- 20:46SPEAKER_00: And one of the things that really intrigued me,
- 20:48one of the reasons I joined this lab was that there was a lot
- 20:52of really exciting
- 20:53SPEAKER_00: stuff going on with foundation models here.
- 20:56SPEAKER_00: So right when I joined, DOFA was already well underway.
- 20:59SPEAKER_00: So DOFA is the dynamic one for all model.
- 21:02SPEAKER_00: It's this neuroplasticity paper that people might have seen on archive.
- 21:07SPEAKER_00: Basically, the idea with DOFA is that you can encode
- 21:12uh use a use a dynamic hyper network to take the wavelength of
- 21:17each spectral band
- 21:18as input and dynamically generate the first layer of your
- 21:23vision transformer so
- 21:24that as long as you know the wavelengths of your spectral bands
- 21:28this single set of
- 21:29pre-trained weights works for every earth observation satellite
- 21:34ever launched
- 21:36SPEAKER_00: and that will ever be launched in the future.
- 21:39SPEAKER_00: So this is an extremely powerful,
- 21:41SPEAKER_00: flexible,
- 21:42SPEAKER_00: multimodal model,
- 21:43SPEAKER_00: really the first such multimodal model that existed.
- 21:46There's been a lot of other things since then that I've been
- 21:48involved with.
- 21:50SPEAKER_00: The Copernicus Foundation model,
- 21:51SPEAKER_00: which supports Sentinel-1,
- 21:53SPEAKER_00: 2,
- 21:54SPEAKER_00: 3,
- 21:54SPEAKER_00: 5P,
- 21:55SPEAKER_00: and Copernicus DEM,
- 21:56SPEAKER_00: where we're adding in a language encoder,
- 21:58SPEAKER_00: allowing us to support non-optical modalities.
- 22:02SPEAKER_00: Panopticon,
- 22:03SPEAKER_00: which takes a lot of the ideas of DOFA,
- 22:06SPEAKER_00: incorporates a lot of the ideas of Dyno V2,
- 22:09SPEAKER_00: and generally makes a more robust and more powerful foundation model.
- 22:14SPEAKER_00: We have DOFA Clip,
- 22:15which is a real vision language model where you can do
- 22:20zero-shot learning,
- 22:21SPEAKER_00: talk to your model,
- 22:22SPEAKER_00: and ask it to label your data for you without any fine-tuning required.
- 22:26SPEAKER_02: Mm-hmm.
- 22:27SPEAKER_00: So these are the things I've been involved with.
- 22:30SPEAKER_00: As you've noted, foundation models are the latest and greatest buzzword.
- 22:33SPEAKER_00: There's a lot of hype centered around this new concept.
- 22:37SPEAKER_00: Everyone wants to get into foundation models.
- 22:40SPEAKER_00: At the same time, the hype is obviously bigger than what it's delivering.
- 22:44SPEAKER_00: There's still a lot of people saying,
- 22:46you know it's great that you've spent millions of dollars
- 22:49training these gigantic
- 22:50foundation models on tons of compute tons of data but my random
- 22:54forest model still
- 22:55works quite well my my supervised unit still works quite well
- 22:59and i think the
- 23:00SPEAKER_00: things that are really missing in that discussion are the scientists so
- 23:07you know a lot of the the higher profile things i've seen
- 23:11recently are things like
- 23:13you know i tried i tried comparing um all of these foundation
- 23:17models to just a
- 23:18regular unit and i trained them on big earth net and unit
- 23:22worked better so
- 23:23SPEAKER_00: foundation models are useless
- 23:25SPEAKER_00: And what people don't realize is,
- 23:27SPEAKER_00: one,
- 23:27you're doing supervised fine tuning on one model and linear
- 23:33probing on all the
- 23:33SPEAKER_00: other ones.
- 23:34SPEAKER_00: And that's not a fair comparison.
- 23:35SPEAKER_00: You can still do supervised fine tuning on your foundation models.
- 23:40SPEAKER_00: And the real benefit is that you can...
- 23:43learn much quicker you already have a very good start so you
- 23:46can fine-tune directly
- 23:48from pre-trained weights instead of random weights that's a
- 23:50huge advantage for
- 23:51anyone who's not a machine learning expert but also the data
- 23:55set sizes that real
- 23:56scientists work with are orders of magnitude different than
- 23:59something like big
- 24:00SPEAKER_00: earth net which has a half a million images in it
- 24:03SPEAKER_00: So a lot of scientists I talk to,
- 24:05SPEAKER_00: they come to me and say,
- 24:06SPEAKER_00: hey,
- 24:06SPEAKER_00: I want to get into deep learning.
- 24:07SPEAKER_00: I have this huge data set that we've collected over the last five years.
- 24:11SPEAKER_00: It has over 100 images in it.
- 24:13SPEAKER_00: How can I get started?
- 24:15SPEAKER_00: And when you hear those numbers,
- 24:16SPEAKER_00: you say,
- 24:17SPEAKER_00: well,
- 24:18SPEAKER_00: huge means something very different to the deep learning community.
- 24:21SPEAKER_00: But now that I have these foundation models,
- 24:23100 images is actually sufficient for the first time for really
- 24:27fine tuning for
- 24:28SPEAKER_00: these very diverse applications.
- 24:31SPEAKER_00: So I do think that foundation models show a lot of promise.
- 24:35SPEAKER_00: I also think there's a lot of hype around them.
- 24:37I'm hoping that the hype dies down so that we can actually
- 24:40start collaborating.
- 24:43As you've noticed,
- 24:44there's a lot of promise of one foundation model to rule them
- 24:48all.
- 24:48SPEAKER_00: And in no domain is there one foundation model.
- 24:51SPEAKER_00: In language, in vision, in vision language, there's always competitors.
- 24:55SPEAKER_00: There's always people competing for the latest and greatest.
- 24:58SPEAKER_00: I don't think that's going to change anytime soon.
- 25:00But I'm going to sit here and eat my popcorn and enjoy the ride
- 25:04and just keep
- 25:04adding more and more foundation models to Torchgeo so that it's
- 25:07easy for people to
- 25:08SPEAKER_00: use them and easy for people to compare them.
- 25:11SPEAKER_03: Right,
- 25:11so really supporting all those investigations and making a bit
- 25:14of a hub where
- 25:15SPEAKER_03: people can...
- 25:15SPEAKER_00: And we also have a lot of these pre-training data sets in TorchGeo.
- 25:18We have things like Seasonal Contrast,
- 25:21SSL4EO,
- 25:22S1-2,
- 25:23and Landsat,
- 25:25Copernicus Pre-Train.
- 25:27SPEAKER_00: Big EarthNet,
- 25:27SPEAKER_00: you know,
- 25:28we have a lot of the data sets that people need to pre-train
- 25:30these models.
- 25:31We also have a lot of the data sets that people need to
- 25:34evaluate these models.
- 25:35SPEAKER_00: So Copernicus Bench,
- 25:36SPEAKER_00: SpaceNet,
- 25:37and we would love to add a lot more of these higher order meta
- 25:41benchmark suites
- 25:42SPEAKER_00: that combine all of these individual benchmark data sets.
- 25:46SPEAKER_03: I guess one last question on the foundation board,
- 25:48SPEAKER_03: as you mentioned about the linear probing versus fine tuning.
- 25:51SPEAKER_03: Is Torchgeo going to stay focused on one or the other?
- 25:54SPEAKER_03: Like, for instance, people interested in just using embeddings.
- 25:57SPEAKER_03: Is that something Torchgeo would get into or...?
- 26:00SPEAKER_00: So two questions.
- 26:02SPEAKER_00: On the linear probing versus fine tuning,
- 26:03SPEAKER_00: we do support both and we don't have any personal preference.
- 26:07SPEAKER_00: So for example,
- 26:07SPEAKER_00: if you use semantic segmentation task,
- 26:10you can tell it to freeze the decoder or freeze both the
- 26:15encoder and decoder and
- 26:16SPEAKER_00: only do linear probing at the end layer.
- 26:19SPEAKER_00: Or you can fine tune the entire thing.
- 26:22SPEAKER_00: So we're pretty flexible.
- 26:23SPEAKER_00: We want to remain flexible.
- 26:25SPEAKER_00: All of these are good use cases.
- 26:28SPEAKER_00: Really depends on how much compute you have, how much expertise you have.
- 26:31SPEAKER_00: Choose whatever works for you and use it.
- 26:33SPEAKER_00: We would actually like to make that more flexible in the future.
- 26:36SPEAKER_00: And I think that's something that TerraTorch has done quite well.
- 26:39SPEAKER_00: So depending on how we end up collaborating with folks from IBM,
- 26:44SPEAKER_00: we would love to make that even more flexible in the future.
- 26:47SPEAKER_00: On the topic of embeddings,
- 26:48a lot of people have gotten really excited about embeddings
- 26:51recently after the
- 26:52SPEAKER_00: release of Google's embeddings.
- 26:54SPEAKER_00: I think Presto also released their own embeddings recently.
- 26:57SPEAKER_00: Major Tom had embeddings long before both of those.
- 27:00SPEAKER_00: So I do think that embeddings are the future.
- 27:04SPEAKER_00: We are building embeddings for our own Copernicus Foundation model.
- 27:07So we want to have embeddings that not only incorporate
- 27:11satellite imagery,
- 27:12SPEAKER_00: but also incorporate things like ERA5,
- 27:14SPEAKER_00: which I don't think anyone is really trying to do at the moment.
- 27:17So embeddings are a really nice opportunity to take away a lot
- 27:21of the computational
- 27:22SPEAKER_00: load from domain experts so that they can rely simply on
- 27:28SPEAKER_00: a learned embedding,
- 27:29SPEAKER_00: a low dimensional representation of a location somewhere on Earth,
- 27:34SPEAKER_00: and focus more on the decoder side.
- 27:36SPEAKER_00: So there's a lot less compute required.
- 27:38SPEAKER_00: At the same time, embeddings are definitely in their infancy.
- 27:41SPEAKER_00: There's a lot of issues with the Google embeddings,
- 27:43SPEAKER_00: with all of the embeddings that currently exist.
- 27:46So just like there's a lot of progress that still needs to be
- 27:49made in foundation
- 27:50SPEAKER_00: model research,
- 27:51there's a lot of progress that needs to be made in embedding
- 27:53research as well.
- 27:54SPEAKER_03: Brilliant.
- 27:55SPEAKER_03: Well, thanks for sharing your opinion on those topics.
- 27:57SPEAKER_03: It's been a really fascinating conversation.
- 27:59SPEAKER_03: So much going on, so much potential, I think, still there.
- 28:01SPEAKER_03: Obviously, Torchgeo is on GitHub.
- 28:04SPEAKER_03: It also has a website.
- 28:06You mentioned the Slack channel being a place where people can
- 28:08go and connect with
- 28:09SPEAKER_03: the developers as well.
- 28:11SPEAKER_03: Any other places that people should look to connect and follow along?
- 28:15SPEAKER_00: Yeah, that's most of them.
- 28:16SPEAKER_00: I mean, you can email me, but I will eventually reply.
- 28:18SPEAKER_00: If you message me on Slack, I'll actually probably reply quicker.
- 28:22If you message me on GitHub,
- 28:23I might actually be on GitHub right now answering your
- 28:25questions.
- 28:26SPEAKER_00: So those are definitely the best places to reach out.
- 28:29SPEAKER_00: If you go to the GitHub,
- 28:31SPEAKER_00: which is github.com slash torchgeo slash torchgeo,
- 28:35SPEAKER_00: there are links to all of these other communities.
- 28:37SPEAKER_00: There's a link to join the Slack channel.
- 28:39SPEAKER_00: There's a link to join the Hugging Face community.
- 28:41you can join and participate in discussions and help drive
- 28:46future development of Torch Geo.
- 28:48SPEAKER_00: Brilliant.
- 28:49SPEAKER_03: Okay.
- 28:49Well,
- 28:49once again,
- 28:50thanks for joining me today and I look forward to connecting in
- 28:52the future.
- 28:53SPEAKER_00: Yeah.
- 28:53SPEAKER_00: Thanks for having me.