You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thank you for bringing this up - I know that the code can be confusing here, but both cases (i.e., refine=False and refine=True, the latter being the default) should return the same, i.e., an array of tree and non-tree values which by default correspond to 255 and 0 as defined in the settings.
I have actually realized that as far as I am concerned, there is no deterministic way to know which values of clf.classes_ (where clf is a trained instance of sklearn.ensemble.AdaBoostClassifier) correspond to a tree and non tree pixel. If anyone knows of a way to properly retrieve the tree and non tree class values, I would gladly reopen this and update the Classifier class so that it does not need such information in the initialization. In the meantime, I am closing this issue.
Feel free to reoopen it if needed. Thank you again for using detectree. Best,
Martí
The method Classifier::classify_img returns predicted class (0 or 1) from
clf.predict(X)
forrefine=False
case.The class value is probably from the response build_response_from_arr.
detectree/detectree/classifier.py
Line 376 in 9d20e82
However, the method returns by default 0 or 255 values as tree or none-tree for
refine=True
case.detectree/detectree/classifier.py
Line 407 in 9d20e82
Is such inconsistency intended?
The text was updated successfully, but these errors were encountered: