when uploading an image, users need to determine whether the picture belongs to a certain type of image, such as an airplane.
the example I found is an image classifier, such as training three classified airplanes, cars, and motorcycles, and then uploading an image to determine which category the image is closest to. But I"m not sure what users will upload. For example, I tested and uploaded a cat, and the answer was an airplane. Obviously I can"t train all the picture categories, and it doesn"t meet our needs.
I want to be able to train aircraft for only one category, and then upload pictures to determine yes or no. The code in the
example uses sckikit-learn "s extreme forest algorithm for clustering, but I checked the api, and found no suitable method.
Methods
Methods
fit(X[, y]) Compute k-means clustering.
fit_predict(X[, y]) Compute cluster centers and predict cluster index for each sample.
fit_transform(X[, y]) Compute clustering and transform X to cluster-distance space.
get_params([deep]) Get parameters for this estimator.
predict(X) Predict the closest cluster each sample in X belongs to.
score(X[, y]) Opposite of the value of X on the K-means objective.
set_params(**params) Set the parameters of this estimator.
transform(X) Transform X to a cluster-distance space.
how should I solve this problem?