视觉AI训练营-DAY 4 车辆保险应用

今天的分享内容是搭建车辆保险应用的过程中遇到的问题

一、在系统的实现中,可以使用阿里云视觉智能开放平台的车辆损伤识别功能

点此访问

二、请求参数示例

视觉AI训练营-DAY 4  车辆保险应用

三、引用代码示例

Java版本为例

import com.aliyuncs.DefaultAcsClient;
import com.aliyuncs.IAcsClient;
import com.aliyuncs.exceptions.ClientException;
import com.aliyuncs.exceptions.ServerException;
import com.aliyuncs.profile.DefaultProfile;
import com.google.gson.Gson;
import java.util.*;
import com.aliyuncs.objectdet.model.v20191230.*;

public class RecognizeVehicleDamage {

    public static void main(String[] args) {
        DefaultProfile profile = DefaultProfile.getProfile("cn-shanghai", "<accessKeyId>", "<accessSecret>");
        IAcsClient client = new DefaultAcsClient(profile);

        RecognizeVehicleDamageRequest request = new RecognizeVehicleDamageRequest();
        request.setRegionId("cn-shanghai");
        request.setImageURL("http://viapi-test.oss-cn-shanghai.aliyuncs.com/sanjiye-meizi/%E7%9B%AE%E6%A0%87%E6%A3%80%E6%B5%8B/%E8%BD%A6%E8%BE%86%E6%8D%9F%E4%BC%A4%E8%AF%86%E5%88%AB%20.jpg");

        try {
            RecognizeVehicleDamageResponse response = client.getAcsResponse(request);
            System.out.println(new Gson().toJson(response));
        } catch (ServerException e) {
            e.printStackTrace();
        } catch (ClientException e) {
            System.out.println("ErrCode:" + e.getErrCode());
            System.out.println("ErrMsg:" + e.getErrMsg());
            System.out.println("RequestId:" + e.getRequestId());
        }

    }
}
上一篇:C#反射


下一篇:视觉AI训练营-DAY 1 达摩院视觉AI技术应用探索