Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jk_edge_code_api_integration
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
sikhin.vc
jk_edge_code_api_integration
Commits
86f18c39
Commit
86f18c39
authored
May 05, 2023
by
Sikhin VC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added server API endpoints
parent
91074b9a
Pipeline
#69238
failed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
scripts/cement_counter.py
scripts/cement_counter.py
+1
-4
No files found.
scripts/cement_counter.py
View file @
86f18c39
...
@@ -250,7 +250,6 @@ class CementBagCounter(ModelWrapper):
...
@@ -250,7 +250,6 @@ class CementBagCounter(ModelWrapper):
:return: boolean
:return: boolean
"""
"""
_alignment
,
line_coordinates
=
self
.
get_line_coordinates
()
_alignment
,
line_coordinates
=
self
.
get_line_coordinates
()
logger
.
info
(
f
"line_coordinates {line_coordinates} and _alignment {_alignment}"
)
assert
len
(
line_coordinates
)
==
4
,
"Line coordinates variable is invalid"
assert
len
(
line_coordinates
)
==
4
,
"Line coordinates variable is invalid"
assert
len
(
point
)
==
2
,
"Point variable is invalid"
assert
len
(
point
)
==
2
,
"Point variable is invalid"
...
@@ -303,7 +302,6 @@ class CementBagCounter(ModelWrapper):
...
@@ -303,7 +302,6 @@ class CementBagCounter(ModelWrapper):
frame
=
draw_circles_on_frame
(
frame
=
draw_circles_on_frame
(
frame
,
centroid
,
radius
=
10
,
color
=
(
0
,
0
,
255
),
thickness
=-
1
frame
,
centroid
,
radius
=
10
,
color
=
(
0
,
0
,
255
),
thickness
=-
1
)
)
logger
.
info
(
f
'self.validate_point_position(centroid) {self.validate_point_position(centroid)}'
)
if
self
.
validate_point_position
(
centroid
):
if
self
.
validate_point_position
(
centroid
):
if
not
isinstance
(
self
.
initial_object_position
,
bool
):
if
not
isinstance
(
self
.
initial_object_position
,
bool
):
...
@@ -312,7 +310,6 @@ class CementBagCounter(ModelWrapper):
...
@@ -312,7 +310,6 @@ class CementBagCounter(ModelWrapper):
self
.
initial_object_position
=
True
self
.
initial_object_position
=
True
_point_position
=
self
.
line_point_position
(
point
=
centroid
)
_point_position
=
self
.
line_point_position
(
point
=
centroid
)
logger
.
info
(
f
'Centroid position {_point_position}'
)
# Check point in the same side as the initial object
# Check point in the same side as the initial object
if
_point_position
==
self
.
initial_object_position
:
if
_point_position
==
self
.
initial_object_position
:
# Check the object is not already counted
# Check the object is not already counted
...
@@ -417,7 +414,7 @@ class CementBagCounter(ModelWrapper):
...
@@ -417,7 +414,7 @@ class CementBagCounter(ModelWrapper):
for
x
in
dets
:
for
x
in
dets
:
frame
=
cv2
.
rectangle
(
frame
,
(
x
[
"points"
][
0
],
x
[
"points"
][
1
]),
(
x
[
"points"
][
2
],
x
[
"points"
][
3
]),
frame
=
cv2
.
rectangle
(
frame
,
(
x
[
"points"
][
0
],
x
[
"points"
][
1
]),
(
x
[
"points"
][
2
],
x
[
"points"
][
3
]),
(
255
,
255
,
255
),
2
)
(
255
,
255
,
255
),
2
)
logger
.
info
(
f
"Dets after overlapping removal: {dets}"
)
logger
.
debug
(
f
"Dets after overlapping removal: {dets}"
)
return
dets
,
frame
return
dets
,
frame
def
inference
(
def
inference
(
...
...
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