Select a domain for a Custom Vision project
From the settings tab of your project on the Custom Vision web portal, you can select a model domain for your project. You'll want to choose the domain that's closest to your scenario. If you're accessing Custom Vision through a client library or REST API, you'll need to specify a domain ID when creating the project. You can get a list of domain IDs with Get Domains, or use the table below.
|General||Optimized for a broad range of image classification tasks. If none of the other specific domains are appropriate, or if you're unsure of which domain to choose, select one of the General domains. ID:
|General [A1]||Optimized for better accuracy with comparable inference time as General domain. Recommended for larger datasets or more difficult user scenarios. This domain requires more training time. ID:
|General [A2]||Optimized for better accuracy with faster inference time than General[A1] and General domains. Recommended for most datasets. This domain requires less training time than General and General [A1] domains. ID:
|Food||Optimized for photographs of dishes as you would see them on a restaurant menu. If you want to classify photographs of individual fruits or vegetables, use the Food domain. ID:
|Landmarks||Optimized for recognizable landmarks, both natural and artificial. This domain works best when the landmark is clearly visible in the photograph. This domain works even if the landmark is slightly obstructed by people in front of it. ID:
|Retail||Optimized for images that are found in a shopping catalog or shopping website. If you want high-precision classifying between dresses, pants, and shirts, use this domain. ID:
|Compact domains||Optimized for the constraints of real-time classification on edge devices.|
The General[A1] and General[A2] domains can be used for a broad set of scenarios and are optimized for accuracy. Use the General[A2] model for better inference speed and shorter training time. For larger datasets, you may want to use General[A1] to render better accuracy than General[A2], though it requires more training and inference time. The General model requires more inference time than both General[A1] and General[A2].
|General||Optimized for a broad range of object detection tasks. If none of the other domains are appropriate, or you are unsure of which domain to choose, select the General domain. ID:
|General [A1]||Optimized for better accuracy with comparable inference time as General domain. Recommended for more accurate region location needs, larger datasets, or more difficult user scenarios. This domain requires more training time, and results are not deterministic: expect a +-1% mean Average Precision (mAP) difference with the same training data provided. ID:
|Logo||Optimized for finding brand logos in images. ID:
|Products on shelves||Optimized for detecting and classifying products on shelves. ID:
|Compact domains||Optimized for the constraints of real-time object detection on edge devices.|
The models generated by compact domains can be exported to run locally. In the Custom Vision 3.4 public preview API, you can get a list of the exportable platforms for compact domains by calling the GetDomains API.
All of the following domains support export in ONNX, TensorFlow,TensorFlowLite, TensorFlow.js, CoreML, and VAIDK formats, with the exception that the Object Detection General (compact) domain does not support VAIDK.
Model performance varies by selected domain. In the table below, we report the model size and inference time on Intel Desktop CPU and NVidia GPU . These numbers don't include preprocessing and postprocessing time.
|Task||Domain||ID||Model Size||CPU inference time||GPU inference time|
||6 MB||10 ms||5 ms|
|Classification||General (compact) [S1]||
||43 MB||50 ms||5 ms|
|Object Detection||General (compact)||
||45 MB||35 ms||5 ms|
|Object Detection||General (compact) [S1]||
||14 MB||27 ms||7 ms|
General (compact) domain for Object Detection requires special postprocessing logic. For the detail, please see an example script in the exported zip package. If you need a model without the postprocessing logic, use General (compact) [S1].
There is no guarantee that the exported models give the exactly same result as the prediction API on the cloud. Slight difference in the running platform or the preprocessing implementation can cause larger difference in the model outputs. For the detail of the preprocessing logic, please see this document.
 Intel Xeon E5-2690 CPU and NVIDIA Tesla M60