---
name: "oralDiseasePredictionRun"
mode: "kit"
versionRequirements:
  - { name: "AIKit", version: "1.6.0" }
  - { name: "@ray-js/ray", version: "1.7.43" }
platform:
  - "iOS"
  - "Android"
async: true
title: "oralDiseasePredictionRun - 口腔疾病预测分析"
---

## oralDiseasePredictionRun

> [VERSION] AIKit >= 1.6.0 | @ray-js/ray >= 1.7.43

> [PLATFORM] iOS, Android

> ⚡ **支持 Promise 调用** — 不传 success / fail / complete 回调时，该方法返回 Promise。

### 描述

口腔疾病预测

### 参数

| 属性 | 类型 | 必填 | 默认值 | 最低版本 | 描述 |
| --- | --- | --- | --- | --- | --- |
| `devId` | `string` | 是 | - | `2.0.1` | 设备名称 |
| `inputImagePath` | `string` | 是 | - | `1.6.0` | 图片输入路径 |
| `outImagePath` | `string` | 是 | - | `1.6.0` | 图片输出目录 |
| `complete` | `() => void` | 否 | - | - | 接口调用结束的回调函数（调用成功、失败都会执行） |
| `success` | `(params: Object) => void` ↓见下方 | 否 | - | - | 接口调用成功的回调函数 |
| `fail` | `(params: Object) => void` ↓见下方 | 否 | - | - | 接口调用失败的回调函数 |

#### success 回调参数

| 属性 | 类型 | 最低版本 | 描述 |
| --- | --- | --- | --- |
| `nonOral` | `boolean` | `1.6.0` | 是否非口腔图片 |
| `diseaseType` | `string[]` | `1.6.0` | 预测结果 Normal  正常 Calculus 结石 Caries  龋齿 Gingivitis 牙龈炎 Ulcers  溃疡 Discoloration 牙齿变色 Hypodontia 牙齿发育不全 |
| `heatMapPath` | `string` | `1.6.0` | 模型热力图 |
| `sunlightPath` | `string` | `1.6.0` | 日光模式滤镜 |
| `chromaPath` | `string` | `1.6.0` | 牙周模式滤镜图 |
| `grayscalePath` | `string` | `1.6.0` | 龋齿模式滤镜图 |

#### fail 回调参数

| 属性 | 类型 | 描述 |
| --- | --- | --- |
| `errorMsg` | `string` | 错误信息 |
| `errorCode` | `string \| number` | 错误码 |
| `innerError` | `Object` | 错误扩展 |

##### fail(params).innerError 的属性

| 属性 | 类型 | 描述 |
| --- | --- | --- |
| `errorCode` | `string \| number` | 错误扩展码 |
| `errorMsg` | `string` | 错误扩展信息 |


### 示例代码

#### 基础调用

```tsx
import { ai } from '@ray-js/ray'

const { oralDiseasePredictionRun } = ai;

oralDiseasePredictionRun({
  devId: 'device_001',
  inputImagePath: 'example',
  outImagePath: 'example',
  success: (result) => {
    console.log('oralDiseasePredictionRun success', result);
  },
  fail: (error) => {
    console.log('oralDiseasePredictionRun fail', error.errorMsg);
  },
});
```
