Comments (23)
You can train a model on Slovenian data and apply it to Ukraine, yes
however since the model will be trained on the Slovenian surface, it will very likely perform worse on Ukraine than a model trained on Ukrainian surface. It mostly depends on how similar the two regions are, for instance a model trained on Slovenia will perform poorly in Egypt (lots of bare land) or Norway (lots of snow and sea).
If you are lacking good quality data in Ukraine it might still be worth a try. In the past we also tried mixing high-accuracy (in terms of label) Slovenian data and lower accuracy data from a different country (where only some regions had good labels for instance).
from eo-learn.
Hi @fuckingsore
here it an example of how we did land-cover/land-use classification for Slovenia, it might be the starting point that you're looking for.
from eo-learn.
Hi, thank you.
On which sites and how can I find these files, but with geodata of Ukraine?
svn_border.geojson
land_use_10class_reference_slovenia_partial.gpkg
from eo-learn.
I do not know where you could find LULC data for Ukraine, since it's very country specific.
You might have some luck with the OSM data or perhaps this. You might be able to find some more data online.
from eo-learn.
Why I have problems with these imports?
from eo-learn.
Why I have problems with these imports?
Seems like you are trying to run some outdated code
from eo-learn.
Thanks, that's what I thought
from eo-learn.
Good evening.
If I run your example with Slovenia, and then just substitute pictures of Ukraine, will I get a classification of the land of Ukraine?
from eo-learn.
I don't understand what I need to change in order to run a trained model on Slovenian data to classify the territory of Ukraine. Tell me what needs to be changed in this example and how, please.
https://github.com/sentinel-hub/eo-learn/blob/master/examples/land-cover-map/SI_LULC_pipeline.ipynb
from eo-learn.
Hi @fuckingsore
I don't understand what I need to change in order to run a trained model on Slovenian data to classify the territory of Ukraine. Tell me what needs to be changed in this example and how, please.
- run the notebook to obtain the model trained on data from Slovenia
- create a copy of the notebook and keep the sections for downloading data and applying the model to get the predictions
- change the area and time of interest to suit your needs and run the predictions on the obtained data using the model from step 1.
For more information, you can follow along the blog posts on medium:
- https://medium.com/sentinel-hub/land-cover-classification-with-eo-learn-part-1-2471e8098195
- https://medium.com/sentinel-hub/land-cover-classification-with-eo-learn-part-2-bd9aa86f8500
- https://medium.com/sentinel-hub/land-cover-classification-with-eo-learn-part-3-c62ed9ecd405
from eo-learn.
So I need to change geojson from step 1? but how to change it correctly so that it fits the code further?
from eo-learn.
So I need to change geojson from step 1? but how to change it correctly so that it fits the code further?
Once the AOI is set and the eopatches are downloaded, it doesn't matter where the eopatches are coming from, from the code point of view it should all fit together regardless.
At the same time, the notebook is just an example tutorial on how to use the library and how to construct a pipeline for land use classification, it is not meant to be an out-of-the-box solution for all kinds of problems, so it is expected of the users to make changes of their own and use it as a base to build their own project.
My suggestion would be to try to understand how it all fits together and read the documentation and the blog posts for details. We cannot solve the whole problem for you, but we are happy to help with details and specific problems. However, please keep in mind to provide specific details about the problem you are facing, comments like above are too vague and hard to pinpoint the exact issues you are dealing with.
from eo-learn.
Why there is this error and how fix it?
Draw the RGB image
fig, axs = plt.subplots(nrows=5, ncols=5, figsize=(20, 20))
time_id = np.where(feature_importances == np.max(feature_importances))[0][0]
for i in tqdm(range(len(patchIDs))):
sample_path = os.path.join(EOPATCH_SAMPLES_FOLDER, f"eopatch_{i}")
eopatch = EOPatch.load(sample_path, lazy_loading=True)
ax = axs[i // 5][i % 5]
ax.imshow(np.clip(eopatch.data["FEATURES"][time_id][..., [2, 1, 0]] * 2.5, 0, 1))
ax.set_xticks([])
ax.set_yticks([])
ax.set_aspect("auto")
del eopatch
fig.subplots_adjust(wspace=0, hspace=0)
from eo-learn.
And I also have this error in this part of code:
fig, axs = plt.subplots(nrows=5, ncols=5, figsize=(20, 25))
for i in tqdm(range(len(patchIDs))):
eopatch_path = os.path.join(EOPATCH_SAMPLES_FOLDER, f"eopatch_{i}")
eopatch = EOPatch.load(eopatch_path, lazy_loading=True)
ax = axs[i // 5][i % 5]
im = ax.imshow(eopatch.mask_timeless["LBL_GBM"].squeeze(), cmap=lulc_cmap, norm=lulc_norm)
ax.set_xticks([])
ax.set_yticks([])
ax.set_aspect("auto")
del eopatch
fig.subplots_adjust(wspace=0, hspace=0)
cb = fig.colorbar(im, ax=axs.ravel().tolist(), orientation="horizontal", pad=0.01, aspect=100)
cb.ax.tick_params(labelsize=20)
cb.set_ticks([entry.id for entry in LULC])
cb.ax.set_xticklabels([entry.name for entry in LULC], rotation=45, fontsize=15)
plt.show()
from eo-learn.
Before I used another geojson, eopatches were downloaded successfully and in first part of this notebook rgb picture was painted
from eo-learn.
The first error states you are trying to access temporal slice 11, but the size of the temporal array is 2, perhaps manually set the time_id
to 0 or 1. Perhaps the data you downloaded is not of the size you expect, so I would check the downloaded eopatches
the second issue is probably related to some problem which occurred in between. You are accessing the LBL_GBM
key in the eopatch, but it doesn't seem to exist, meaning that something seemed to have gone wrong in the prediction step. What exactly went wrong, I cannot say.
What is the temporal range you are using?
from eo-learn.
I used temporal range 2022-06-01, 2022-06-30
from eo-learn.
I used temporal range 2022-06-01, 2022-06-30
Well, that explains it. You are using 1 month of data with Sentinel-2 imagery, there aren't always that many satellite images available in such a short time span, especially with cloud filtering applied.
The classification process in the notebook expects a full year worth of data, so try to change as little as possible aside from the AOI and year of the time period if you don't wish to run into unexpected problems
from eo-learn.
For starters I would suggest focusing on a small AOI in Ukraine and 1 year of data, so you can create a working prototype of the project. Perhaps you could use a shorter period than 1 year, but definitely more than just a few months.
from eo-learn.
Hello, guys!
Why does this happen? The area is ~13900 km2.
In QGIS and on first step, I have correct image of this area.
from eo-learn.
I have one more question. If I understand correctly, you collect data per pixel for almost a year. This is so that the result is not affected by the time of year. Can I train a model based on just one snapshot, i.e. split the time series into separate data and train on that? Is it realistic to implement and how to implement it correctly?
from eo-learn.
Why does this happen? The area is ~13900 km2.
the area that you are splitting seems to span 2 UTM zones, so the one on the right is plotted with the wrong UTM zone. Probably the notebook you are using to plot assumes a single UTM vector file, so if you want a proper plot, you should convert to some common CRS (like WGS84) just for plotting.
I have one more question. If I understand correctly, you collect data per pixel for almost a year. This is so that the result is not affected by the time of year.
Correct, or rather to take the full year info into account, so we're not affected by missing data, bad images, or some temporary change on the land.
Can I train a model based on just one snapshot, i.e. split the time series into separate data and train on that? Is it realistic to implement and how to implement it correctly?
You are using the words "one snapshot" and "time series" together, which probably doesn't make sense. If you use just one snapshot, there will be no time series, just a single image.
But sure, you can still do classification based on a single image, but as I mentioned, that image has to be nearly perfect (no clouds, cloud shadows, haze, artifacts, etc... ), in those areas the classification will likely fail
from eo-learn.
Thank you, guys!)
from eo-learn.
Related Issues (20)
- [BUG] ImportError: cannot import name 'PointSamplingTask' from 'eolearn.geometry' HOT 5
- SI_LULC_pipeline notebook HOT 9
- readthedocs links not working HOT 1
- [FEAT] Enable timestamp filtering from interval end towards interval start HOT 5
- [BUG] SentinelHubInputTask downloads incorrect timestamps HOT 6
- [BUG] Issue with the SpatialResizeTask in ImportTiffPipeline when using the resolution approach HOT 5
- [BUG] eo-learn installation issue due to open-cv latest update on Dec 30, 2022. HOT 2
- Registration HOT 4
- [BUG] Failing tests on MacOS related to lock-related EOExecutor tests HOT 1
- [BUG] Reading EOPatches saved with eo-learn 0.10.1 with eolearn 1.4 HOT 2
- [HELP] Where has eopatch_to_dataset gone? HOT 6
- [FEAT] TDigestTask handle nans HOT 1
- [HELP] Error when I'm trying to run land-cover-map HOT 5
- [HELP] Perform sen2cor atmospheric correction on L1C EOPatch HOT 2
- Why I have problems with these imports? HOT 3
- ExecutableNotFound: failed to execute WindowsPath('dot'), make sure the Graphviz executables are on your systems' PATH HOT 3
- how do i fix this HOT 2
- CRSError in rasterio when using ExportToTiffTask HOT 6
- `eo-learn` 1.5.0 migration guide
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eo-learn.