{
"clientid": "sb-42mn3-3z7p-96r-3c79-0x1pm0l!p216|klgco-lag-vitas!d66",
…
"clientsecret": "5ghsdYM/Z567N5LoQ7nrXBkZ0BV=",
"serviceurls": {
…
"IMAGE_RETRAIN_API_URL": "https://mlftrial-retrain-image-api.cfapps.eu10.hana.ondemand.com/api/v2/image/retraining",
…
"IMAGE_CLASSIFICATION_URL": "https://mlftrial-image-classifier.cfapps.eu10.hana.ondemand.com/api/v2/image/classification",
…
},
"url": "https://p2000894545trial.authentication.eu10.hana.ondemand.com"
}
URL: {url}/oauth/token
POST
https://p2000482375trial.authentication.eu10.hana.ondemand.com/oauth/token
Header:
Content-Type: application/x-www-form-urlencoded
Body:
grant_type: client_credentials
client_id: <replace it with clientid>
client_secret: <replace it with clientsecret>
Test:
pm.test("Set Bearer Token", function () {
var data = pm.response.json();
pm.environment.set("Bearer Token", "Bearer " + data.access_token);
});
URL: IMAGE_RETRAIN_API_URL/storage
Doc: https://api.sap.com/api/retraining_service_imgc_api/resource
POST
https://mlftrial-retrain-image-api.cfapps.eu10.hana.ondemand.com/api/v2/image/retraining/storage
Header:
Authorization: {{Bearer Token}}
Result:
{
"accessKey": "18gXjKdl5YR",
"endpoint": "j310p.files.trial.eu-central-1.aws.ml.hana.ondemand.com",
"message": "The endpoint is ready to use.",
"secretKey": "b47iOAuRYosEtGT",
"status": "READY"
}
fashion_data
├── test
│ ├── blouses
│ ├── cloak
│ ├── coat
│ ├── jacket
│ ├── jersey__t-shirt__tee_shirt
│ ├── long_dress
│ ├── polo_shirt__sport_shirt
│ ├── robe
│ ├── shirt
│ ├── short_dress
│ ├── suit__suit_of_clothes
│ ├── sweater
│ ├── undergarment__upper_body
│ ├── uniform
│ └── vest__waistcoat
├── training
│ ├── blouses
│ ├── cloak
│ ├── coat
│ ├── jacket
│ ├── jersey__t-shirt__tee_shirt
│ ├── long_dress
│ ├── polo_shirt__sport_shirt
│ ├── robe
│ ├── shirt
│ ├── short_dress
│ ├── suit__suit_of_clothes
│ ├── sweater
│ ├── undergarment__upper_body
│ ├── uniform
│ └── vest__waistcoat
└── validation
├── blouses
├── cloak
├── coat
├── jacket
├── jersey__t-shirt__tee_shirt
├── long_dress
├── polo_shirt__sport_shirt
├── robe
├── shirt
├── short_dress
├── suit__suit_of_clothes
├── sweater
├── undergarment__upper_body
├── uniform
└── vest__waistcoat
mc config host add saps3 https://<endpoint>; <accessKey> <secretKey>
mc config host add saps3 https://j310p.files.trial.eu-central-1.aws.ml.hana.ondemand.com 18gXjKdl5YR b47iOAuRYosEtGT
mc ls saps3/
mc cp --recursive fashion_data saps3/data
URL: IMAGE_RETRAIN_API_URL/jobs
Doc: https://api.sap.com/api/retraining_service_imgc_api/resource
POST
https://mlftrial-retrain-image-api.cfapps.eu10.hana.ondemand.com/api/v2/image/retraining/jobs
Headers:
Authorization: {{Bearer Token}}
Accept application/json
Content-Type application/json
Body:
{
"dataset": "fashion_data",
"modelName": "apparel_fashion"
}
Result:
{
"id": "fashiondata-2018-10-31t2118z489249"
}
URL: IMAGE_RETRAIN_API_URL/jobs
Doc: https://api.sap.com/api/retraining_service_imgc_api/resource
GET
https://mlftrial-retrain-image-api.cfapps.eu10.hana.ondemand.com/api/v2/image/retraining/jobs
Results:
{
"jobs": [
{
"message": "Requested resources are unavailable.
Please wait or cancel your job.",
"id": "fashiondata-2018-10-31t2118z489249",
"submissionTime": "2018-10-31T20:55:40+00:00",
"status": "PENDING"
}
]
}
{
"jobs": [
{
"startTime": "2018-10-29T08:46:24+00:00",
"id": "fashiondata-2018-10-31t2118z489249",
"finishTime": "2018-10-29T09:31:30+00:00",
"status": "SUCCEEDED",
"submissionTime": "2018-10-29T08:38:41+00:00",
"message": ""
}
]
}
mc cp --recursive saps3/data/fashiondata-2018-10-31t2118z489249/ logs
URL: IMAGE_RETRAIN_API_URL/deployments
Doc: https://api.sap.com/api/retraining_service_imgc_api/resource
POST
https://mlftrial-retrain-image-api.cfapps.eu10.hana.ondemand.com/api/v2/image/retraining/deployments
Header:
Authorization {{Bearer Token}}
Content-Type application/json
Body:
{
"modelName": "apparel_fashion",
"modelVersion": “1”
}
Result:
{
"id": "f6b34f68-6bf0-4fe8-98f5-9f9a4310a9b8"
}
URL: IMAGE_CLASSIFICATION_URL/models/{model}/versions/{version}
Doc: https://api.sap.com/api/image_classification_api/resource
POST
https://mlftrial-image-classifier.cfapps.eu10.hana.ondemand.com/api/v2/image/classification/models/a...
Header:
Authorization {{Bearer Token}}
Content-Type application/json
Body:
files: model-1338993_640.jpg
{
"id": "4ac738e5-2ae7-40b1-7c71-5811ffefd957",
"predictions": [
{
"name": "model-1338993_640.jpg",
"results": [
{
"label": "blouses",
"score": 0.4417305588722229
},
{
"label": "sweater",
"score": 0.17741338908672333
},
{
"label": "jersey__t-shirt__tee_shirt",
"score": 0.09909668564796448
},
{
"label": "shirt",
"score": 0.08796049654483795
},
{
"label": "jacket",
"score": 0.0525900162756443
},
{
"label": "cloak",
"score": 0.05253848433494568
},
{
"label": "polo_shirt__sport_shirt",
"score": 0.035483747720718384
},
{
"label": "short_dress",
"score": 0.03353172168135643
},
{
"label": "long_dress",
"score": 0.011001537553966045
},
{
"label": "undergarment__upper_body",
"score": 0.002974236151203513
},
{
"label": "coat",
"score": 0.0025379941798746586
},
{
"label": "robe",
"score": 0.0012542953481897712
},
{
"label": "vest__waistcoat",
"score": 0.0008026888244785368
},
{
"label": "uniform",
"score": 0.0006318347295746207
},
{
"label": "suit__suit_of_clothes",
"score": 0.0004524094401858747
}
]
}
],
"processedTime": "2018-10-31T22:02:29.581062+00:00",
"status": "DONE"
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
36 | |
25 | |
17 | |
13 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 |