Skip to content

Commit 8be801b

Browse files
committed
图片审核增加大图压缩参数
1 parent 8fcaab6 commit 8be801b

File tree

1 file changed

+45
-41
lines changed

1 file changed

+45
-41
lines changed

ci.go

Lines changed: 45 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -103,29 +103,31 @@ func (s *CIService) ImageProcess(ctx context.Context, name string, opt *ImagePro
103103

104104
// ImageRecognitionOptions is the option of ImageAuditing
105105
type ImageRecognitionOptions struct {
106-
CIProcess string `url:"ci-process,omitempty"`
107-
DetectType string `url:"detect-type,omitempty"`
108-
DetectUrl string `url:"detect-url,omitempty"`
109-
Interval int `url:"interval,omitempty"`
110-
MaxFrames int `url:"max-frames,omitempty"`
111-
BizType string `url:"biz-type,omitempty"`
106+
CIProcess string `url:"ci-process,omitempty"`
107+
DetectType string `url:"detect-type,omitempty"`
108+
DetectUrl string `url:"detect-url,omitempty"`
109+
Interval int `url:"interval,omitempty"`
110+
MaxFrames int `url:"max-frames,omitempty"`
111+
BizType string `url:"biz-type,omitempty"`
112+
LargeImageDetect int `url:"large-image-detect,omitempty"`
112113
}
113114

114115
// ImageRecognitionResult is the result of ImageRecognition/ImageAuditing
115116
type ImageRecognitionResult struct {
116-
XMLName xml.Name `xml:"RecognitionResult"`
117-
JobId string `xml:"JobId,omitempty"`
118-
Text string `xml:"Text,omitempty"`
119-
Label string `xml:"Label,omitempty"`
120-
Result int `xml:"Result,omitempty"`
121-
Score int `xml:"Score,omitempty"`
122-
SubLabel string `xml:"SubLabel,omitempty"`
123-
PornInfo *RecognitionInfo `xml:"PornInfo,omitempty"`
124-
TerroristInfo *RecognitionInfo `xml:"TerroristInfo,omitempty"`
125-
PoliticsInfo *RecognitionInfo `xml:"PoliticsInfo,omitempty"`
126-
AdsInfo *RecognitionInfo `xml:"AdsInfo,omitempty"`
127-
TeenagerInfo *RecognitionInfo `xml:"TeenagerInfo,omitempty"`
128-
TerrorismInfo *RecognitionInfo `xml:"TerrorismInfo,omitempty"`
117+
XMLName xml.Name `xml:"RecognitionResult"`
118+
JobId string `xml:"JobId,omitempty"`
119+
Text string `xml:"Text,omitempty"`
120+
Label string `xml:"Label,omitempty"`
121+
Result int `xml:"Result,omitempty"`
122+
Score int `xml:"Score,omitempty"`
123+
SubLabel string `xml:"SubLabel,omitempty"`
124+
PornInfo *RecognitionInfo `xml:"PornInfo,omitempty"`
125+
TerroristInfo *RecognitionInfo `xml:"TerroristInfo,omitempty"`
126+
PoliticsInfo *RecognitionInfo `xml:"PoliticsInfo,omitempty"`
127+
AdsInfo *RecognitionInfo `xml:"AdsInfo,omitempty"`
128+
TeenagerInfo *RecognitionInfo `xml:"TeenagerInfo,omitempty"`
129+
TerrorismInfo *RecognitionInfo `xml:"TerrorismInfo,omitempty"`
130+
CompressionResult int `xml:"CompressionResult,omitempty"`
129131
}
130132

131133
// RecognitionInfo is the result of auditing scene
@@ -177,11 +179,12 @@ func (s *CIService) ImageAuditing(ctx context.Context, name string, opt *ImageRe
177179

178180
// ImageAuditingInputOptions is the option of BatchImageAuditingOptions
179181
type ImageAuditingInputOptions struct {
180-
DataId string `xml:",omitempty"`
181-
Object string `xml:",omitempty"`
182-
Url string `xml:",omitempty"`
183-
Interval int `xml:",omitempty"`
184-
MaxFrames int `xml:",omitempty"`
182+
DataId string `xml:",omitempty"`
183+
Object string `xml:",omitempty"`
184+
Url string `xml:",omitempty"`
185+
Interval int `xml:",omitempty"`
186+
MaxFrames int `xml:",omitempty"`
187+
LargeImageDetect int `xml:",omitempty"`
185188
}
186189

187190
// ImageAuditingJobConf is the config of BatchImageAuditingOptions
@@ -197,24 +200,25 @@ type BatchImageAuditingOptions struct {
197200
Conf *ImageAuditingJobConf `xml:"Conf"`
198201
}
199202

200-
// ImageRecognitionResult is the result of BatchImageAuditingJobResult
203+
// ImageAuditingResult is the result of BatchImageAuditingJobResult
201204
type ImageAuditingResult struct {
202-
Code string `xml:",omitempty"`
203-
Message string `xml:",omitempty"`
204-
JobId string `xml:"JobId,omitempty"`
205-
DataId string `xml:",omitempty"`
206-
Object string `xml:",omitempty"`
207-
Url string `xml:",omitempty"`
208-
Text string `xml:",omitempty"`
209-
Label string `xml:",omitempty"`
210-
Result int `xml:",omitempty"`
211-
Score int `xml:",omitempty"`
212-
SubLabel string `xml:",omitempty"`
213-
PornInfo *RecognitionInfo `xml:",omitempty"`
214-
TerrorismInfo *RecognitionInfo `xml:",omitempty"`
215-
PoliticsInfo *RecognitionInfo `xml:",omitempty"`
216-
AdsInfo *RecognitionInfo `xml:",omitempty"`
217-
TeenagerInfo *RecognitionInfo `xml:",omitempty"`
205+
Code string `xml:",omitempty"`
206+
Message string `xml:",omitempty"`
207+
JobId string `xml:"JobId,omitempty"`
208+
DataId string `xml:",omitempty"`
209+
Object string `xml:",omitempty"`
210+
Url string `xml:",omitempty"`
211+
Text string `xml:",omitempty"`
212+
Label string `xml:",omitempty"`
213+
Result int `xml:",omitempty"`
214+
Score int `xml:",omitempty"`
215+
SubLabel string `xml:",omitempty"`
216+
PornInfo *RecognitionInfo `xml:",omitempty"`
217+
TerrorismInfo *RecognitionInfo `xml:",omitempty"`
218+
PoliticsInfo *RecognitionInfo `xml:",omitempty"`
219+
AdsInfo *RecognitionInfo `xml:",omitempty"`
220+
TeenagerInfo *RecognitionInfo `xml:",omitempty"`
221+
CompressionResult int `xml:",omitempty"`
218222
}
219223

220224
// BatchImageAuditingJobResult is the result of BatchImageAuditing

0 commit comments

Comments
 (0)