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
Train a new multi-faceted classifier on the uploaded image data. Create your
184
-
custom classifier with positive or negative examples. Include at least two sets of
185
-
examples, either two positive example files or one positive and one negative file.
186
-
You can upload a maximum of 256 MB per call. Encode all names in UTF-8 if they
187
-
contain non-ASCII characters (.zip and image file names, and classifier and class
188
-
names). The service assumes UTF-8 encoding if it encounters non-ASCII characters.
189
-
190
-
:param str name: The name of the new classifier. Encode special characters in UTF-8.
191
-
:param file classname_positive_examples: A .zip file of images that depict the visual subject of a class in the new classifier. You can include more than one positive example file in a call. Append `_positive_examples` to the form name. The prefix is used as the class name. For example, `goldenretriever_positive_examples` creates the class **goldenretriever**. Include at least 10 images in .jpg or .png format. The minimum recommended image resolution is 32X32 pixels. The maximum number of images is 10,000 images or 100 MB per .zip file. Encode special characters in the file name in UTF-8. The API explorer limits you to training only one class. To train more classes, use the API functionality.
192
-
:param file negative_examples: A compressed (.zip) file of images that do not depict the visual subject of any of the classes of the new classifier. Must contain a minimum of 10 images. Encode special characters in the file name in UTF-8.
193
-
:param str classname_positive_examples_filename: The filename for classname_positive_examples.
194
-
:param str negative_examples_filename: The filename for negative_examples.
195
-
:return: A `dict` containing the `Classifier` response.
196
-
:rtype: dict
197
-
"""
198
-
ifnameisNone:
199
-
raiseValueError('name must be provided')
200
-
ifclassname_positive_examplesisNone:
201
-
raiseValueError('classname_positive_examples must be provided')
:param str name: The name of the new classifier. Cannot contain special characters.
180
+
:param file <NAME>_positive_examples: A compressed (.zip) file of images that depict the visual subject for a class within the new classifier. Must contain a minimum of 10 images. The swagger limits you to training only one class. To train more classes, use the API functionality.
181
+
:param file negative_examples: A compressed (.zip) file of images that do not depict the visual subject of any of the classes of the new classifier. Must contain a minimum of 10 images.
182
+
:return: A `dict` containing the `Classifier` response.
Encode all names in UTF-8 if they contain non-ASCII characters (.zip and image
295
-
file names, and classifier and class names). The service assumes UTF-8 encoding if
296
-
it encounters non-ASCII characters. **Important:** You can't update a custom
297
-
classifier with an API key for a Lite plan. To update a custom classifer on a Lite
298
-
plan, create another service instance on a Standard plan and re-create your custom
299
-
classifier. **Tip:** Don't make retraining calls on a classifier until the status
300
-
is ready. When you submit retraining requests in parallel, the last request
301
-
overwrites the previous requests. The retrained property shows the last time the
302
-
classifier retraining finished.
303
-
304
250
:param str classifier_id: The ID of the classifier.
305
-
:param file classname_positive_examples: A .zip file of images that depict the visual subject of a class in the classifier. The positive examples create or update classes in the classifier. You can include more than one positive example file in a call. Append `_positive_examples` to the form name. The prefix is used to name the class. For example, `goldenretriever_positive_examples` creates the class `goldenretriever`. Include at least 10 images in .jpg or .png format. The minimum recommended image resolution is 32X32 pixels. The maximum number of images is 10,000 images or 100 MB per .zip file. Encode special characters in the file name in UTF-8.
306
-
:param file negative_examples: A compressed (.zip) file of images that do not depict the visual subject of any of the classes of the new classifier. Must contain a minimum of 10 images. Encode special characters in the file name in UTF-8.
307
-
:param str classname_positive_examples_filename: The filename for classname_positive_examples.
308
-
:param str negative_examples_filename: The filename for negative_examples.
251
+
:param file <NAME>_positive_examples: A compressed (.zip) file of images that depict the visual subject for a class within the classifier. Must contain a minimum of 10 images.
252
+
:param file negative_examples: A compressed (.zip) file of images that do not depict the visual subject of any of the classes of the new classifier. Must contain a minimum of 10 images.
309
253
:return: A `dict` containing the `Classifier` response.
0 commit comments