All URIs are relative to https://app.nanonet.com/api/v2
Method | HTTP request | Description |
---|---|---|
object_detection_model_upload_file_by_model_id_post | POST /ObjectDetection/Model/{model_id}/UploadFile/ | Upload training images by File |
object_detection_model_upload_urls_by_model_id_post | POST /ObjectDetection/Model/{model_id}/UploadUrls/ | Upload training images by Url |
object_detection_model_upload_file_by_model_id_post(data, file, model_id)
Upload training images by File
You can use this endpoint to upload training images for a category (for the specified model) using locally stored files. You will receive model information along with total number of images per category on successful execution.
Note: Filename in Data must be the same as that of the uploaded image name.
from __future__ import print_function
import time
import nanonets
from nanonets.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = nanonets.ObjectUploadApi()
data = 'data_example' # str |
file = 'file_example' # file |
model_id = 'model_id_example' # str |
try:
# Upload training images by File
api_instance.object_detection_model_upload_file_by_model_id_post(data, file, model_id)
except ApiException as e:
print("Exception when calling ObjectUploadApi->object_detection_model_upload_file_by_model_id_post: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
data | str | ||
file | file | ||
model_id | str |
void (empty response body)
No authorization required
- Content-Type: multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object_detection_model_upload_urls_by_model_id_post(body, content_type, model_id)
Upload training images by Url
You can use this endpoint to upload training images for a category (for the specified model) by image urls. You can upload multiple images in the same request by adding an array of urls. You will receive model information along with total number of images per category on successful execution.
from __future__ import print_function
import time
import nanonets
from nanonets.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: ApiKey
configuration = nanonets.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = nanonets.ObjectUploadApi(nanonets.ApiClient(configuration))
body = nanonets.UploadTrainingImagesByUrlrequest() # UploadTrainingImagesByUrlrequest |
content_type = 'content_type_example' # str |
model_id = 'model_id_example' # str |
try:
# Upload training images by Url
api_instance.object_detection_model_upload_urls_by_model_id_post(body, content_type, model_id)
except ApiException as e:
print("Exception when calling ObjectUploadApi->object_detection_model_upload_urls_by_model_id_post: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | UploadTrainingImagesByUrlrequest | ||
content_type | str | ||
model_id | str |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]