Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CM_LABELS definition #123

Closed
XiaoleiQinn opened this issue Mar 7, 2024 · 3 comments
Closed

CM_LABELS definition #123

XiaoleiQinn opened this issue Mar 7, 2024 · 3 comments

Comments

@XiaoleiQinn
Copy link

Thank you for sharing the code! When I display these dataset, value 0 should be the background. I wonder if CM_LABELS should start with the value 1 in constants.py, corresponding to the CROPS definition?

@1flyingpig
Copy link

I also have the same question. I would like to know what text labels correspond to different numeric labels in Ghana and South Sudan. Have you solved this problem? Can we share some information?

@roserustowicz
Copy link
Owner

roserustowicz commented May 16, 2024

These values should be used as are defined in the constants.py file:

CM_LABELS = { 'ghana': [0, 1, 2, 3], 
              'southsudan': [0, 1, 2, 3], 
              'tanzania': [0, 1, 2, 3, 4],
              'germany': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] }

CROPS = { 'ghana': ['groundnut', 'maize', 'rice', 'soya bean'], 
          'southsudan': ['sorghum', 'maize', 'rice', 'groundnut'], 
          'tanzania': ['maize', 'beans', 'sunflower', 'chickpeas', 'wheat'],
          'germany': ['sugar beet', 'summer oat', 'meadow', 'rapeseed', 'hop', 'winter spelt', 
                      'winter triticale', 'beans', 'peas', 'potato', 'soybeans', 'asparagus', 
                      'winter wheat', 'winter barley', 'winter rye', 'summer barley', 'maize']}

@1flyingpig
Copy link

These values should used as are defined in the constants.py file:

CM_LABELS = { 'ghana': [0, 1, 2, 3], 
              'southsudan': [0, 1, 2, 3], 
              'tanzania': [0, 1, 2, 3, 4],
              'germany': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] }

CROPS = { 'ghana': ['groundnut', 'maize', 'rice', 'soya bean'], 
          'southsudan': ['sorghum', 'maize', 'rice', 'groundnut'], 
          'tanzania': ['maize', 'beans', 'sunflower', 'chickpeas', 'wheat'],
          'germany': ['sugar beet', 'summer oat', 'meadow', 'rapeseed', 'hop', 'winter spelt', 
                      'winter triticale', 'beans', 'peas', 'potato', 'soybeans', 'asparagus', 
                      'winter wheat', 'winter barley', 'winter rye', 'summer barley', 'maize']}

I saw this information in Constant.py, but maybe it wasn't useful to me, maybe I wasn't clear, because I was reading the.npz file in truth directly as lable, but I found that the number labels here ranged from 0 to 24, It is not the 0-4 number label you provided, so I have the above question, I wonder if you can solve this problem, thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants