Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OV JS] Add optical-character-recognition sample notebook #25191

Merged
merged 17 commits into from
Jul 26, 2024
Prev Previous commit
Next Next commit
remove extra line
  • Loading branch information
qxprakash committed Jul 8, 2024
commit 57a6f6a89d57d536808a33effc5fd3207def18bf
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
{
"language": "typescript",
"source": [
"// Create infer request\nconst inferRequest = detCompiledModel.createInferRequest();\nlet boundingBoxesArray;\n// Define the completion callback function\nconst completionCallback = (outputTensor, displayImageMat) => {\n boundingBoxesArray = extractBoundingBoxes(outputTensor);\n displayArrayAsImage(displayImageMat.data, \n displayImageMat.cols, \n displayImageMat.rows, \n display);\n};\n\n// Start inference in asynchronous mode\nconst inferAsyncProcess = async () => {\n try {\n const result = await inferRequest.inferAsync([tensor]);\n completionCallback(result[detOutputLayer], displayImageMat);\n } catch (error) {\n console.error('Error during inference:', error);\n }\n};\n\n\nawait inferAsyncProcess();\n"
"// Create infer request\nconst inferRequest = detCompiledModel.createInferRequest();\nlet boundingBoxesArray;\n// Define the completion callback function\nconst completionCallback = (outputTensor, displayImageMat) => {\n boundingBoxesArray = extractBoundingBoxes(outputTensor);\n displayArrayAsImage(displayImageMat.data, \n displayImageMat.cols, \n displayImageMat.rows, \n display);\n};\n\n// Start inference in asynchronous mode\nconst inferAsyncProcess = async () => {\n try {\n const result = await inferRequest.inferAsync([tensor]);\n completionCallback(result[detOutputLayer], displayImageMat);\n } catch (error) {\n console.error('Error during inference:', error);\n }\n};\n\nawait inferAsyncProcess();\n"
],
"outputs": [
{
Expand Down
Loading