NanoNets
  1. OCR Upload
NanoNets
  • Image Classification Model Predict
    • Prediction for image File
      POST
    • Prediction for image URLs
      POST
  • Image Classification Model
    • Get Model by Id
      GET
    • Create New Model
      POST
    • Get All Models
      GET
  • Image Classification Model Train
    • Train Model
      POST
  • Image Classification Model Upload
    • Upload training images by File
      POST
    • Upload training images by Url
      POST
  • OCR Predict
    • Get Prediction File By Page ID
      GET
    • Get All Prediction Files
      GET
    • Get Prediction File By File ID
      GET
    • Prediction for image file
      POST
    • Async Prediction for image file
      POST
    • Prediction for image url
      POST
    • Async Prediction for image url
      POST
  • Get Full Text
    • Get Full Text
      POST
  • OCR Model
    • Create New Model
      POST
    • Get Model by Id
      GET
  • OCR Train
    • Train Model
      POST
  • OCR Upload
    • Upload training images by File
      POST
    • Upload training images by Url
      POST
  1. OCR Upload

Upload training images by Url

开发环境
http://dev-cn.your-api-server.com
开发环境
http://dev-cn.your-api-server.com
POST
/OCR/Model/{model_id}/UploadUrls/
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.

请求参数

Path 参数

Header 参数

Body 参数application/json

示例

返回响应

🟢200Model Object
application/json
Body

🟢202Request partially successful. One or more urls might not be correct or got no response
🟠400Category not valid for model. Check if this model has the category used in the request OR Urls missing. Check if you have included an array of image urls
🟠404Model does not exists. Check if the model id exists
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://dev-cn.your-api-server.com/OCR/Model//UploadUrls/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "data": [
        {
            "filename": "https://nanonets.s3-us-west-2.amazonaws.com/test-images/test1.jpg",
            "object": [
                {
                    "bndbox": {
                        "xmax": 100,
                        "xmin": 1,
                        "ymax": 100,
                        "ymin": 1
                    },
                    "name": "{{category1}}"
                }
            ]
        }
    ],
    "urls": [
        "https://nanonets.s3-us-west-2.amazonaws.com/test-images/test1.jpg"
    ]
}'
响应示例响应示例
200 - response
{
    "Data": [
        {
            "filename": "example.jpeg",
            "id": "00000000-0000-0000-0000-000000000000",
            "object": [
                {
                    "bndbox": {
                        "xmax": 100,
                        "xmin": 1,
                        "ymax": 100,
                        "ymin": 1
                    },
                    "name": "category1",
                    "ocr_text": "text inside the bounding box"
                }
            ],
            "size": {
                "height": 1024,
                "width": 1024
            }
        }
    ],
    "Meta": {
        "Accuracy": 0,
        "Categories": [
            {
                "count": 0,
                "name": "category1"
            },
            {
                "count": 0,
                "name": "category2"
            }
        ],
        "ModelID": "00000000-0000-0000-0000-000000000000",
        "ModelType": "ocr",
        "State": 0,
        "Status": "Current Status"
    }
}
修改于 2024-05-29 05:52:24
上一页
Upload training images by File
Built with