You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
import request from '@/config/axios'
|
|
|
|
|
|
|
|
|
|
|
|
// 训练 VO
|
|
|
|
|
|
export interface TrainVO {
|
|
|
|
|
|
id: number // id
|
|
|
|
|
|
dataId: number // 项目id
|
|
|
|
|
|
train: number // 训练集比例
|
|
|
|
|
|
val: number // 验证图像比例
|
|
|
|
|
|
test: number // 测试图像比例
|
|
|
|
|
|
round: number // 轮次
|
|
|
|
|
|
size: number // 批次大小
|
|
|
|
|
|
imageSize: number // 图片大小(正方向,大于这个值进行缩放,小于这个值进行放大,不是正方形将图片周围涂黑)
|
|
|
|
|
|
modelPath: string // 预选训练模型
|
|
|
|
|
|
path: string // 训练图片路径
|
|
|
|
|
|
trainType: number // 类型,使用哪个gpu
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 训练 API
|
|
|
|
|
|
export const TrainApi = {
|
|
|
|
|
|
// 查询训练分页
|
|
|
|
|
|
getTrainPage: async (params: any) => {
|
|
|
|
|
|
return await request.get({ url: `/annotation/train/page`, params })
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 查询训练详情
|
|
|
|
|
|
getTrain: async (id: number) => {
|
|
|
|
|
|
return await request.get({ url: `/annotation/train/get?id=` + id })
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 新增训练
|
|
|
|
|
|
createTrain: async (data: TrainVO) => {
|
|
|
|
|
|
return await request.post({ url: `/annotation/train/create`, data })
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 修改训练
|
|
|
|
|
|
updateTrain: async (data: TrainVO) => {
|
|
|
|
|
|
return await request.put({ url: `/annotation/train/update`, data })
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 删除训练
|
|
|
|
|
|
deleteTrain: async (id: number) => {
|
|
|
|
|
|
return await request.delete({ url: `/annotation/train/delete?id=` + id })
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 导出训练 Excel
|
|
|
|
|
|
exportTrain: async (params) => {
|
|
|
|
|
|
return await request.download({ url: `/annotation/train/export-excel`, params })
|
|
|
|
|
|
},
|
|
|
|
|
|
}
|