Skip to content

Commit

Permalink
Yongbing chen/human in the loop (#517)
Browse files Browse the repository at this point in the history
* upload analyze file to assets

* move spinner label to strings

* adjust labels

* issuefix

* typo

* adjust getLabelValues

* typo

* remove option bar when upload asset in the future runs

* feature:  "Auto Labeling"

* move AutoLabelingStatus to predictService.ts

* update ocr when auto labeling

(cherry picked from commit 42438598d5d7a325e82bbad191ed483f44094439)

* fix tslint error

* handle formRegion.text undefined error

* decode asset name when upload asset

* add HITL document override confirm

* Merge branch 'yongbing-chen/human-in-the-loop' of https://github.com/microsoft/OCR-Form-Tools into yongbing-chen/human-in-the-loop

* disable autolabeling button when no predict model

* move runAutoLabelingOnCurrentDocument to canvas.tsx

* remove assetMetadata if no labels find after auto-labeling

* fix tslint check

* object deep clone

Co-authored-by: alex-krasn <64093224+alex-krasn@users.noreply.github.com>
  • Loading branch information
yongbing-chen and alex-krasn authored Sep 10, 2020
1 parent b92b73b commit be9d564
Show file tree
Hide file tree
Showing 21 changed files with 731 additions and 262 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ secrets.sh
# complexity reports
es6-src/
report/
debug.log
10 changes: 10 additions & 0 deletions src/common/localization/en-us.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,14 @@ export const english: IAppStrings = {
downloadScript: "Analyze with python script",
defaultLocalFileInput: "Browse for a file...",
defaultURLInput: "Paste or type URL...",
editAndUploadToTrainingSet: "Edit & upload to training set",
editAndUploadToTrainingSetNotify: "by clicking on this button, this form will be added to this project, where you can edit these labels.",
editAndUploadToTrainingSetNotify2: "We are adding this file to your training set, where you could edit the labels and re-train the model.",
uploadInPrgoress: "Upload in progress...",
confirmDuplicatedAssetName: {
title: "Asset name exists",
message: "Asset with name '${name}' exists in project, override?"
}
},
recentModelsView: {
header: "Select a model to analyze with",
Expand Down Expand Up @@ -434,6 +442,8 @@ export const english: IAppStrings = {
subIMenuItems: {
runOcrOnCurrentDocument: "Run OCR on current document",
runOcrOnAllDocuments: "Run OCR on all documents",
runAutoLabelingCurrentDocument: "Run AutoLabeling on current document",
noPredictModelOnProject: "Predict model not avaliable, please train the model first.",
}
}
}
Expand Down
10 changes: 10 additions & 0 deletions src/common/localization/es-cl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,14 @@ export const spanish: IAppStrings = {
downloadScript: "Analizar con script python",
defaultLocalFileInput: "Busca un archivo...",
defaultURLInput: "Pegar o escribir URL...",
editAndUploadToTrainingSet: "Editar y cargar al conjunto de entrenamiento",
editAndUploadToTrainingSetNotify: "Al hacer clic en este botón, este formulario se agregará al Blob de Azure Storage para este proyecto, donde puede editar estas etiquetas.",
editAndUploadToTrainingSetNotify2: "Estamos agregando este archivo a su conjunto de entrenamiento, donde puede editar las etiquetas y volver a entrenar el modelo.",
uploadInPrgoress: "carga en curso...",
confirmDuplicatedAssetName: {
title: "El nombre del activo existe",
message: "El activo con el nombre '${name}' existe en el proyecto, ¿anularlo?"
}
},
recentModelsView: {
header: "Seleccionar modelo para analizar con",
Expand Down Expand Up @@ -435,6 +443,8 @@ export const spanish: IAppStrings = {
subIMenuItems: {
runOcrOnCurrentDocument: "Ejecutar OCR en el documento actual",
runOcrOnAllDocuments: "Ejecute OCR en todos los documentos",
runAutoLabelingCurrentDocument: "Ejecutar AutoLabeling en el documento actual",
noPredictModelOnProject: "Predecir modelo no disponible, entrene el modelo primero.",
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/common/mockFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ export default class MockFactory {
saveProject: jest.fn(() => Promise.resolve()),
deleteProject: jest.fn(() => Promise.resolve()),
closeProject: jest.fn(() => Promise.resolve()),
addAssetToProject: jest.fn(() => Promise.resolve()),
deleteAsset: jest.fn(() => Promise.resolve()),
loadAssets: jest.fn(() => Promise.resolve()),
loadAssetMetadata: jest.fn(() => Promise.resolve()),
Expand Down
12 changes: 11 additions & 1 deletion src/common/strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,14 @@ export interface IAppStrings {
downloadScript: string,
defaultLocalFileInput: string,
defaultURLInput: string,
editAndUploadToTrainingSet: string,
editAndUploadToTrainingSetNotify: string,
editAndUploadToTrainingSetNotify2: string,
uploadInPrgoress: string,
confirmDuplicatedAssetName: {
title: string,
message: string
},
};
recentModelsView: {
header: string;
Expand Down Expand Up @@ -277,7 +285,7 @@ export interface IAppStrings {
messages: {
saveSuccess: string,
deleteSuccess: string,
doNotAllowDuplicateNames:string,
doNotAllowDuplicateNames: string,
},
imageCorsWarning: string,
blobCorsWarning: string,
Expand Down Expand Up @@ -429,6 +437,8 @@ export interface IAppStrings {
subIMenuItems: {
runOcrOnCurrentDocument: string,
runOcrOnAllDocuments: string,
runAutoLabelingCurrentDocument: string,
noPredictModelOnProject: string,
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/models/applicationState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export interface IProviderOptions {
export interface IAppSettings {
securityTokens: ISecurityToken[],
thumbnailSize?: ISize,
hideUploadingOption?: boolean;
}

/**
Expand Down
Loading

0 comments on commit be9d564

Please sign in to comment.