Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
INT-HACK-Groupe7
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PC-AP-INT446-N-2023
Hacking Health
INT-HACK-Groupe7
Commits
05fea191
Commit
05fea191
authored
2 years ago
by
Renaud
Browse files
Options
Downloads
Patches
Plain Diff
Fix
parent
3765425c
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
poc/__init__.py
+2
-3
2 additions, 3 deletions
poc/__init__.py
poc/_ocr.py
+1
-1
1 addition, 1 deletion
poc/_ocr.py
test.py
+4
-2
4 additions, 2 deletions
test.py
with
7 additions
and
6 deletions
poc/__init__.py
+
2
−
3
View file @
05fea191
"""
Outils permettant la création de l
'
application finale
@author: Groupe 7
Preuve de concept d
'
une solution numérique permettant d
'
identifier tout implant
ou prothèse à partir des informations présentes sur son emballage.
"""
__all__
=
[
...
...
This diff is collapsed.
Click to expand it.
poc/_ocr.py
+
1
−
1
View file @
05fea191
...
...
@@ -14,7 +14,7 @@ class OCR:
# le modèle en mémoire
# Le modèle de langage "en" a été choisi car c'est celui qui donne les
# meilleurs résultats parmi les modèles "cn", "en" et "fr".
self
.
ocr
=
self
.
__ocr_initialize__
(
use_gpu
)
self
.
ocr
=
self
.
__ocr_initialize__
(
use_gpu
=
use_gpu
)
def
__ocr_initialize__
(
self
,
lang
=
'
en
'
,
use_gpu
=
True
)
->
PaddleOCR
:
"""
...
...
This diff is collapsed.
Click to expand it.
test.py
+
4
−
2
View file @
05fea191
from
poc
import
*
import
os
# Constantes
FONT_DIR
=
"
data/font
"
...
...
@@ -7,6 +8,9 @@ TEST_IMAGES_DIR = "data/img"
OUTPUT_DIR
=
"
out
"
def
main
():
if
not
os
.
path
.
isdir
(
OUTPUT_DIR
):
os
.
mkdir
(
OUTPUT_DIR
)
# 1. Phase de reconnaissance optiques de caractères
ocr
=
OCR
(
use_gpu
=
True
)
groups
=
ocr
.
recognize
(
TEST_IMAGES_DIR
+
"
/biomet.jpg
"
)
...
...
@@ -25,8 +29,6 @@ def main():
# 3. Ajout en base de données
# partie BD : strs = [group.string for group in groups]
#######
groups2
=
ocr
.
recognize
(
TEST_IMAGES_DIR
+
"
/stryker.jpg
"
)
ocr
.
save_ocr
(
groups2
,
TEST_IMAGES_DIR
+
"
/stryker.jpg
"
,
OUTPUT_DIR
+
"
/stryker_export_step1.jpg
"
,
FONT_DIR
+
"
/
"
+
FONT_FILENAME
)
identification2
=
Identification
(
groups2
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment