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
0699d4fd
Commit
0699d4fd
authored
Feb 12, 2021
by
dasharatha.vamshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
good sample to no defect
parent
17a8ef89
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
scripts/welspun_classifier.py
scripts/welspun_classifier.py
+2
-2
No files found.
scripts/welspun_classifier.py
View file @
0699d4fd
...
@@ -99,7 +99,7 @@ class Welspun_Classifier(ModelWrapper):
...
@@ -99,7 +99,7 @@ class Welspun_Classifier(ModelWrapper):
try
:
try
:
frame
=
obj
[
'frame'
]
frame
=
obj
[
'frame'
]
orig_image
=
cv2
.
resize
(
frame
,
(
3840
,
2160
))
orig_image
=
cv2
.
resize
(
frame
,
(
224
,
224
))
frame
=
self
.
process_frame
(
orig_image
)
frame
=
self
.
process_frame
(
orig_image
)
obj
[
'frame'
]
=
cv2
.
resize
(
frame
,
(
self
.
config
.
get
(
'FRAME_WIDTH'
),
self
.
config
.
get
(
'FRAME_HEIGHT'
)))
obj
[
'frame'
]
=
cv2
.
resize
(
frame
,
(
self
.
config
.
get
(
'FRAME_WIDTH'
),
self
.
config
.
get
(
'FRAME_HEIGHT'
)))
...
@@ -179,7 +179,7 @@ class Welspun_Classifier(ModelWrapper):
...
@@ -179,7 +179,7 @@ class Welspun_Classifier(ModelWrapper):
mean
=
[
0.485
,
0.456
,
0.406
]
mean
=
[
0.485
,
0.456
,
0.406
]
std
=
[
0.229
,
0.224
,
0.225
]
std
=
[
0.229
,
0.224
,
0.225
]
image
=
image
*
1
/
255.0
image
=
image
*
1
/
255.0
image
=
(
image
-
mean
)
/
std
#
image = (image - mean) / std
return
image
return
image
def
softmax_function
(
self
,
vec
):
def
softmax_function
(
self
,
vec
):
...
...
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