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

From Batch Processing Example in Load Images int ImageSet #175

Open
thobaniha opened this issue Feb 4, 2022 · 2 comments
Open

From Batch Processing Example in Load Images int ImageSet #175

thobaniha opened this issue Feb 4, 2022 · 2 comments

Comments

@thobaniha
Copy link

Greetings
I am new to image processing, I am encountering a problem whe trying to run the Batch Processing.ipynb file. This problem is from cell 3 of code in "Load Images into ImageSet" section. Please look at it below and your assistance will be highly appreciated. Thanks


ValueError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_4552\898569403.py in
18
19 import jenkspy
---> 20 breaks = jenkspy.jenks_breaks(df[color_property], nb_class=num_color_classes)
21
22 color_stops = create_color_stops(breaks,colors='YlOrRd')

~\Anaconda3\envs\micasense\lib\site-packages\jenkspy\core.py in jenks_breaks(values, nb_class)
105
106 if nb_class >= nb_values or nb_class < 2:
--> 107 raise ValueError("Number of class have to be an integer "
108 "greater than 2 and "
109 "smaller than the number of values to use")

ValueError: Number of class have to be an integer greater than 2 and smaller than the number of values to use

@poynting
Copy link
Contributor

The color_property variable is by default set to dls-yaw. If your data doesn't have that property (for example, because it was gathered without a DLS) then this process will fail. If dls_yaw or whatever column is chosen as the has fewer than 8 distinct values, it will also fail, since the default num_color_classes is set to 8.

It's possible to print the columns variable, inspect the values that are available, and change the color_property to one of those.

@thobaniha
Copy link
Author

Hi @poynting, thanks for a response. I get what you are saying. I am using the dataset from the tutorial not a different data. So is it possile that they miseed that point regarding the color_property from the tutorial?

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

2 participants