VSainteuf / pytorch-psetae

PyTorch implementation of the model presented in "Satellite Image Time Series Classification with Pixel-Set Encoders and Temporal Self-Attention"
MIT License
179 stars 39 forks source link

Label set in paper #3

Closed bkj closed 4 years ago

bkj commented 4 years ago

In the paper, the results are reported for a 20-class classification task. However, it looks like the number of classes in the dataset are either 17 or 35:

>>> z = json.load(open('labels.json'))
>>> len(set(z['label_19class'].values()))
17
>>> len(set(z['label_44class'].values()))
35

Are you able to give more details on the setup of the experiments in the paper?

Thanks!

Edit: Also -- there's a -1 class in label_19class -- what does that mean?

VSainteuf commented 4 years ago
VSainteuf commented 4 years ago

And I am not sure about the -1 class, I'll have a closer look!

bkj commented 4 years ago

Oops -- the -1 thing was my mistake -- apologies!

VSainteuf commented 4 years ago

Good news ;)

VSainteuf commented 4 years ago

Last thing about the classes: we use the sub_class argument of PixelSetData to only consider these 20 classes with enough samples.

priti28192 commented 2 years ago

Hi, Thank you very much for providing the implementation of your paper. I am trying to understand your code. But, I am not able to find the names of the 20 or 44 classes in the order used in the implementation. Can you direct me towards the name of the classes.

Kind regards, Priti

VSainteuf commented 2 years ago
  1. Undefined
  2. Meadow
  3. Spring Durum Wheat
  4. Winter Durum Wheat
  5. Spring Cereal
  6. Summer Cereal
  7. Winter Cereal
  8. Corn and Zea
  9. Sorghum / Millet / Moha
  10. Cereal
  11. Buckwheat
  12. Hemp
  13. Leguminous Fodder
  14. Other Fodder
  15. Winter Rapeseed
  16. Spring Rapeseed
  17. Sunflower
  18. Oleaginous
  19. Soy
  20. Protein Crop
  21. Rice
  22. Beetroot
  23. Flax
  24. Potato
  25. Tobacco
  26. Banana
  27. Coffee / Cocoa
  28. Dry Vegetable
  29. Fruits, Vegetables, Flowers
  30. Lavender
  31. Fragrant Plants, Aromatic and Medicinal
  32. Ligneous
  33. Olive groves
  34. Orchards
  35. Grapevine
  36. Short Rotation Coppice
  37. Non-agricultural Surface
  38. Built Area
  39. Biomass
  40. Wood
  41. Sugar cane
  42. Water, Marsh
  43. Hop
  44. Other
VSainteuf commented 2 years ago

Here's the list of class names for each label. Was that what you needed ?

priti28192 commented 2 years ago

Thank you very much @VSainteuf for your quick response. This is what I was looking for. Thank you for that. I had one more question. The pre-trained weights provided with the repo, is it trained on this label_44class nomenclature? Or you are using label_20class nomenclature for it. Also, is it possible to get access to the actual Sentinel-2 dataset with the timestamps?

Kind regards, Priti

VSainteuf commented 2 years ago

Yes, as said earlier in this issue:

  • Not all classes of the nomenclature are observed in the S2 tile (hence 17 and 35 instead of 19 and 44)
  • In the paper we use the 44 class system, but we also select those classes for which more than 100 parcels are available in the dataset, reducing the number of classes to 20.

So we use the 44 label set, reduced to the 20 most frequent classes. And I don't have the original Sentinel-2 dataset anymore. You would need to re-download it using the timestamps of dates.json.

priti28192 commented 2 years ago

Thanks @VSainteuf for the information. It was very helpful of you.

nathanokole commented 3 months ago

Hi, One quick question: I can see you have a class named Beetroot, does this class also encompass sugar beet? Also, the link to the pretrained weights does not work. Is it possible to have a working link? Thanks, Nathan