Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
Welspun-Classification
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dasharatha.vamshi
Welspun-Classification
Commits
ae9d1080
Commit
ae9d1080
authored
Feb 15, 2021
by
dasharatha.vamshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes
parent
12189ac4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
133 additions
and
135 deletions
+133
-135
scripts/welspun_classifier.py
scripts/welspun_classifier.py
+133
-135
No files found.
scripts/welspun_classifier.py
View file @
ae9d1080
...
...
@@ -209,7 +209,6 @@ class Welspun_Classifier(ModelWrapper):
# log.info("Batch size is {}".format(n))
#
# log.info("Starting inference in synchronous mode")
if
self
.
counter
%
3
==
0
:
start
=
time
.
time
()
res
=
self
.
exec_net
.
infer
(
inputs
=
{
self
.
input_blob
:
images
})
print
(
f
"Inference time: {time.time() - start}"
)
...
...
@@ -227,7 +226,7 @@ class Welspun_Classifier(ModelWrapper):
a
=
x
.
index
(
max
(
x
))
# print(type(prob))
# if self.counter%1 == 0:
#
self.counter = self.counter + 1
self
.
counter
=
self
.
counter
+
1
if
a
==
1
and
x
[
1
]
>
0.95
:
if
self
.
defect_type
==
'Mix'
:
...
...
@@ -347,10 +346,9 @@ class Welspun_Classifier(ModelWrapper):
# fontScale=1, fontFace=cv2.LINE_AA)
# self.send_payload("Stitch Detected", frame, "Stitch " + str(prob[0]), "#472020", "#ed2020", "sound_1")
# logger.info(f"Probability: {prob}")
self
.
counter
=
self
.
counter
+
1
# self.counter
= self.counter + 1
print
(
"total time taken to process-------------> "
,
str
(
time
.
time
()
-
starttime
))
# logger.info(f"total time taken to process----------------- {time.time()-starttime}")
# cv2.imshow('res', frame)
else
:
pass
return
frame
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment