Use Global Datasets

Global datasets are public datasets that Salesforce provides. You can use these datasets to include additional data during training when you create a model.

One way you use global datasets is to create a negative class in your model. A negative class is returned in a prediction for an image that doesn't match any of the other classes.

For example, the beaches and mountains model has only two classes: Beaches and Mountains. If you classify an image of an airplane using that model, the response returns probabilities for those two classes, which aren’t very helpful.

Instead, you can use the global dataset to add another label named "other". Now when you train the beaches and mountains dataset, you include the global dataset. Your original dataset stays the same, but the data from the global dataset is added to the model. The model then contains these labels: Mountains, Beaches, and other.

This cURL command trains a dataset and creates a model using one of the global datasets. Replace <DATASET_ID> with your dataset ID. The global dataset ID specified here (1005161) is the ID for a standard image classification dataset.

Now when you send an image of an airplane for classification, the model returns this response.

You can use global datasets in both train and retrain API calls.

Use the global query parameter to return a list of global datasets. This cURL command returns all the global datasets.

This cURL call returns a response similar to this one. Note the dataset type, and be sure that the global dataset type matches the type of the dataset that you train to create a model.

Global datasets are a little different than datasets that you create using your own data.

  • You can return global datasets only by using the API call that gets all datasets.
  • Global datasets can only be used together with one of your own datasets to create a model.
  • You can’t get a single global dataset, get its examples, train it, or delete it.