View individual eopatches

How to view data by eopatch on training data? Like the image below but it is not at the level of training data. What I wanted to do now.


I got the above image through the following code:

# Chargement et visualisation de la carte de reference de l'eopache 17
# Loading and visualization of the eopache 17 reference map
eopatch_17 = EOPatch.load(os.path.join(EOPATCH_FOLDER, 'eopatch_17'), lazy_loading=True)

# Plot
fig, (ax1, ax2) = plt.subplots(1,2,figsize=(25,10))

_ = ax1.imshow(np.clip(eopatch_17.data['BANDS'][0][..., [3,2,1]] * 3.5, 0., 1.))
ref_map = ax2.imshow(eopatch_17.mask_timeless['LULC'][...,0], interpolation='nearest', cmap=lulc_cmap, norm=lulc_norm)

ax1.set_xticks([])
ax1.set_yticks([])
ax2.set_xticks([])
ax2.set_yticks([])
ax1.set_title('Image RGB', fontsize=15)
ax2.set_title('Carte de référence LULC', fontsize=15)

cb = fig.colorbar(ref_map, ax=[ax1, ax2], orientation='vertical', pad=0.01, aspect=60)
cb.set_ticks([entry.id for entry in LULC])
cb.ax.set_yticklabels([entry.class_name for entry in LULC], fontsize=15);

I would like to do the same with the training data.
I need your help. THANKS

Hi @christsen76 ,

From what I can see in your code, you are plotting the true color image using the data from the first timestamp in your EOPatch and it’s reference data indicating land use/ land cover. In general, this data can be used to train a model, which is the “training data” in my understanding.

After you’ve trained your model, you can make a prediction on the existing EOPatces. There is a step-by-step guide on how to visualise the result in the eo-learn example notebook.

If the training data and the prediction described above are not what you want to plot, please describe a bit more about your workflow, e.g., what you’re trying to do, what’s the data in EO Patches, what exactly do you want to plot, etc. This could help us understanding your issue, thank you.

Thank you, I will try again