Skip to content

Commit

Permalink
up to date
Browse files Browse the repository at this point in the history
  • Loading branch information
MulongXie committed Sep 5, 2021
1 parent 456d264 commit 213f907
Show file tree
Hide file tree
Showing 6 changed files with 5,153 additions and 141 deletions.
115 changes: 113 additions & 2 deletions .ipynb_checkpoints/main-checkpoint.ipynb
Original file line number Diff line number Diff line change
@@ -1,6 +1,117 @@
{
"cells": [],
"metadata": {},
"cells": [
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"from GUI import GUI"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"gui = GUI(img_file='data/input/7.jpg')"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[Text Detection Completed in 1.512 s] Input: data/input/7.jpg Output: data/output\\ocr\\7.json\n",
"[Compo Detection Completed in 0.811 s] Input: data/input/7.jpg Output: data/output\\ip\\7.json\n",
"[Merge Completed] Input: data/input/7.jpg Output: data/output\\uied\\7.jpg\n"
]
}
],
"source": [
"gui.element_detection(True, True, True)\n",
"gui.visualize_element_detection()"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[Layout Recognition Completed in 1.513 s] Input: data/input/7.jpg Output: data/output\\layout\\7.json\n"
]
}
],
"source": [
"gui.layout_recognition()\n",
"gui.visualize_layout_recognition()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"import cv2"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"name = 'd1'\n",
"org = cv2.imread('data/input/' + name + '.jpg')\n",
"uied = cv2.imread('data/output/uied/' + name + '.jpg')\n",
"group = cv2.imread('data/output/layout/' + name + '-group.jpg')\n",
"lst = cv2.imread('data/output/layout/' + name + '-list.jpg')\n",
"\n",
"cv2.imshow('org', cv2.resize(org, (400, 800)))\n",
"cv2.imshow('uied', uied)\n",
"cv2.imshow('group', group)\n",
"cv2.imshow('list', lst)\n",
"cv2.waitKey()\n",
"cv2.destroyAllWindows()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.6"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Loading

0 comments on commit 213f907

Please sign in to comment.