Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aart_ppe_detection
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
aart_ppe_detection
Commits
00f8b77a
You need to sign in or sign up before continuing.
Commit
00f8b77a
authored
Dec 12, 2022
by
Sikhin VC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improved text appearance
parent
8f1ebc50
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
98 additions
and
5 deletions
+98
-5
app.py
app.py
+1
-1
logs/ilens-edge_engine.log
logs/ilens-edge_engine.log
+84
-0
scripts/__pycache__/ppe.cpython-39.pyc
scripts/__pycache__/ppe.cpython-39.pyc
+0
-0
scripts/ppe.py
scripts/ppe.py
+13
-4
No files found.
app.py
View file @
00f8b77a
import
os
import
os
# os.environ["config"]="{\"TZ\": \"Asia/Kolkata\", \"MONGO_URI\": \"mongodb://svc-ilens:svc2345@192.168.3.220:21017\", \"MONGO_DATABASE\": \"ilens_wps\", \"MONGO_COLLECTION\": \"janusDeployment\", \"MONGO_KEY\": \"deploymentId\", \"MONGO_VALUE\": \"rahul_12345\", \"MONGO_COLL\": \"serviceConfiguration\", \"MONGO_DB\": \"ilens_wps\"}"
# os.environ["config"]="{\"TZ\": \"Asia/Kolkata\", \"MONGO_URI\": \"mongodb://svc-ilens:svc2345@192.168.3.220:21017\", \"MONGO_DATABASE\": \"ilens_wps\", \"MONGO_COLLECTION\": \"janusDeployment\", \"MONGO_KEY\": \"deploymentId\", \"MONGO_VALUE\": \"rahul_12345\", \"MONGO_COLL\": \"serviceConfiguration\", \"MONGO_DB\": \"ilens_wps\"}"
# os.environ["config"]="{\"TZ\": \"Asia/Kolkata\", \"MONGO_URI\": \"mongodb://admin:iLens$HPCLv605@10.5.2.91:2717\", \"MONGO_DATABASE\": \"ilens_ai\", \"MONGO_COLLECTION\": \"janusDeployment\", \"MONGO_KEY\": \"deploymentId\", \"MONGO_VALUE\": \"hpcl_cctv_ppe\", \"MONGO_COLL\": \"serviceConfiguration\", \"MONGO_DB\": \"ilens_ai\"}"
# os.environ["config"]="{\"TZ\": \"Asia/Kolkata\", \"MONGO_URI\": \"mongodb://admin:iLens$HPCLv605@10.5.2.91:2717\", \"MONGO_DATABASE\": \"ilens_ai\", \"MONGO_COLLECTION\": \"janusDeployment\", \"MONGO_KEY\": \"deploymentId\", \"MONGO_VALUE\": \"hpcl_cctv_ppe\", \"MONGO_COLL\": \"serviceConfiguration\", \"MONGO_DB\": \"ilens_ai\"}"
os
.
environ
[
"config"
]
=
"{
\"
TZ
\"
:
\"
Asia/Kolkata
\"
,
\"
MONGO_URI
\"
:
\"
mongodb://admin:iLens$1234@192.168.3.181:2717/admin
\"
,
\"
MONGO_DATABASE
\"
:
\"
ilens_ai
\"
,
\"
MONGO_COLLECTION
\"
:
\"
janusDeployment
\"
,
\"
MONGO_KEY
\"
:
\"
deploymentId
\"
,
\"
MONGO_VALUE
\"
:
\"
aarti_ppe
\"
,
\"
MONGO_COLL
\"
:
\"
serviceConfiguration
\"
,
\"
MONGO_DB
\"
:
\"
ilens_ai
\"
}"
#
os.environ["config"]="{\"TZ\": \"Asia/Kolkata\", \"MONGO_URI\": \"mongodb://admin:iLens$1234@192.168.3.181:2717/admin\", \"MONGO_DATABASE\": \"ilens_ai\", \"MONGO_COLLECTION\": \"janusDeployment\", \"MONGO_KEY\": \"deploymentId\", \"MONGO_VALUE\": \"aarti_ppe\", \"MONGO_COLL\": \"serviceConfiguration\", \"MONGO_DB\": \"ilens_ai\"}"
from
edge_engine.edge_processor
import
ExecutePipeline
from
edge_engine.edge_processor
import
ExecutePipeline
from
edge_engine.edge_processor
import
Pubs
from
edge_engine.edge_processor
import
Pubs
from
scripts
import
Ppe
from
scripts
import
Ppe
...
...
logs/ilens-edge_engine.log
View file @
00f8b77a
...
@@ -6549,3 +6549,87 @@ IndexError: list index out of range
...
@@ -6549,3 +6549,87 @@ IndexError: list index out of range
2022-12-12 13:44:21,022 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 13:44:21,022 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 13:45:19,319 INFO ilens-edge_engine building publishers
2022-12-12 13:45:19,319 INFO ilens-edge_engine building publishers
2022-12-12 13:45:19,491 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 13:45:19,491 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:27:13,631 INFO ilens-edge_engine building publishers
2022-12-12 14:27:14,022 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:27:48,772 INFO ilens-edge_engine building publishers
2022-12-12 14:27:49,038 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:28:07,015 INFO ilens-edge_engine building publishers
2022-12-12 14:28:07,195 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:28:21,698 INFO ilens-edge_engine building publishers
2022-12-12 14:28:21,893 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:28:51,559 INFO ilens-edge_engine building publishers
2022-12-12 14:28:51,746 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:29:10,583 INFO ilens-edge_engine building publishers
2022-12-12 14:29:10,768 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:29:29,007 INFO ilens-edge_engine building publishers
2022-12-12 14:29:29,194 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:29:53,029 INFO ilens-edge_engine building publishers
2022-12-12 14:29:53,209 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:30:17,272 INFO ilens-edge_engine building publishers
2022-12-12 14:30:17,456 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:30:34,096 INFO ilens-edge_engine building publishers
2022-12-12 14:30:34,270 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:30:46,288 INFO ilens-edge_engine building publishers
2022-12-12 14:30:46,609 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:31:45,292 INFO ilens-edge_engine building publishers
2022-12-12 14:31:45,480 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:32:43,808 INFO ilens-edge_engine building publishers
2022-12-12 14:32:44,003 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:33:10,920 INFO ilens-edge_engine building publishers
2022-12-12 14:33:11,101 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:33:23,897 INFO ilens-edge_engine building publishers
2022-12-12 14:33:24,073 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:33:52,927 INFO ilens-edge_engine building publishers
2022-12-12 14:33:53,098 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:34:14,320 INFO ilens-edge_engine building publishers
2022-12-12 14:34:14,497 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:39:01,639 INFO ilens-edge_engine building publishers
2022-12-12 14:39:01,846 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:40:00,382 INFO ilens-edge_engine building publishers
2022-12-12 14:40:00,556 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:41:10,237 INFO ilens-edge_engine building publishers
2022-12-12 14:41:10,412 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:42:26,801 INFO ilens-edge_engine building publishers
2022-12-12 14:42:26,985 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:42:59,369 INFO ilens-edge_engine building publishers
2022-12-12 14:42:59,554 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:43:56,359 INFO ilens-edge_engine building publishers
2022-12-12 14:43:56,536 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:45:16,292 INFO ilens-edge_engine building publishers
2022-12-12 14:45:16,474 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:45:34,306 INFO ilens-edge_engine building publishers
2022-12-12 14:45:34,492 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:46:10,618 INFO ilens-edge_engine building publishers
2022-12-12 14:46:10,804 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:47:09,696 INFO ilens-edge_engine building publishers
2022-12-12 14:47:09,870 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:47:25,214 INFO ilens-edge_engine building publishers
2022-12-12 14:47:25,421 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:47:37,538 INFO ilens-edge_engine building publishers
2022-12-12 14:47:37,724 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:48:03,474 INFO ilens-edge_engine building publishers
2022-12-12 14:48:03,663 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:48:22,110 INFO ilens-edge_engine building publishers
2022-12-12 14:48:22,302 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:48:44,892 INFO ilens-edge_engine building publishers
2022-12-12 14:48:46,198 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:50:26,110 INFO ilens-edge_engine building publishers
2022-12-12 14:50:26,297 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:50:51,818 INFO ilens-edge_engine building publishers
2022-12-12 14:50:52,006 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:51:24,237 INFO ilens-edge_engine building publishers
2022-12-12 14:51:24,437 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:51:53,546 INFO ilens-edge_engine building publishers
2022-12-12 14:51:53,719 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:52:08,743 INFO ilens-edge_engine building publishers
2022-12-12 14:52:08,916 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:52:18,674 INFO ilens-edge_engine building publishers
2022-12-12 14:52:18,852 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:52:51,942 INFO ilens-edge_engine building publishers
2022-12-12 14:52:52,130 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:53:14,644 INFO ilens-edge_engine building publishers
2022-12-12 14:53:14,821 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:53:42,321 INFO ilens-edge_engine building publishers
2022-12-12 14:53:42,511 INFO ilens-edge_engine Setting up frame processor !!
2022-12-12 14:54:06,242 INFO ilens-edge_engine building publishers
2022-12-12 14:54:06,443 INFO ilens-edge_engine Setting up frame processor !!
scripts/__pycache__/ppe.cpython-39.pyc
View file @
00f8b77a
No preview for this file type
scripts/ppe.py
View file @
00f8b77a
...
@@ -384,10 +384,19 @@ class Ppe(ModelWrapper):
...
@@ -384,10 +384,19 @@ class Ppe(ModelWrapper):
# self.final_ppe_result = {}
# self.final_ppe_result = {}
print
(
"person with safety kit"
,
str
(
person_with_safety_kit
))
print
(
"person with safety kit"
,
str
(
person_with_safety_kit
))
print
(
"person without safety kit"
,
str
(
person_without_safety_kit
))
print
(
"person without safety kit"
,
str
(
person_without_safety_kit
))
person_without_kit_text
=
"PERSON WITHOUT SAFETY KIT : "
+
str
(
person_without_safety_kit
)
person_without_kit_text
=
"PERSON WITHOUT AIR BREATHING MASK : "
+
str
(
person_without_safety_kit
)
person_with_kit_text
=
"PERSON WITH SAFETY KIT : "
+
str
(
person_with_safety_kit
)
person_with_kit_text
=
"PERSON WITH AIR BREATHING MASK : "
+
str
(
person_with_safety_kit
)
cv2
.
putText
(
frame
,
person_with_kit_text
,
(
800
,
50
),
cv2
.
FONT_HERSHEY_SIMPLEX
,
2
,
(
0
,
255
,
0
),
4
,
2
)
cv2
.
rectangle
(
frame
,
(
870
,
0
),
(
1400
,
50
),
(
0
,
255
,
0
),
-
1
)
cv2
.
putText
(
frame
,
person_without_kit_text
,
(
800
,
150
),
cv2
.
FONT_HERSHEY_SIMPLEX
,
2
,
(
0
,
0
,
255
),
4
,
2
)
cv2
.
rectangle
(
frame
,
(
870
,
50
),
(
1400
,
120
),
(
50
,
50
,
50
),
-
1
)
cv2
.
rectangle
(
frame
,
(
1400
,
0
),
(
1900
,
50
),
(
0
,
0
,
255
),
-
1
)
cv2
.
rectangle
(
frame
,
(
1400
,
50
),
(
1900
,
120
),
(
50
,
50
,
50
),
-
1
)
cv2
.
putText
(
frame
,
"WITH AIR BREATHING MASK"
,
(
880
,
30
),
cv2
.
FONT_HERSHEY_SIMPLEX
,
1
,
(
0
,
0
,
0
),
4
,
2
)
cv2
.
putText
(
frame
,
"WITHOUT AIR BREATHING MASK"
,
(
1400
,
30
),
cv2
.
FONT_HERSHEY_SIMPLEX
,
1
,
(
0
,
0
,
0
),
4
,
2
)
cv2
.
putText
(
frame
,
str
(
person_with_safety_kit
),
(
1100
,
100
),
cv2
.
FONT_HERSHEY_SIMPLEX
,
1
,
(
255
,
255
,
255
),
4
,
2
)
cv2
.
putText
(
frame
,
str
(
person_without_safety_kit
),
(
1600
,
100
),
cv2
.
FONT_HERSHEY_SIMPLEX
,
1
,
(
255
,
255
,
255
),
4
,
2
)
return
frame
return
frame
def
draw_line_over_image
(
self
,
frame
,
color
=
(
255
,
255
,
255
)):
def
draw_line_over_image
(
self
,
frame
,
color
=
(
255
,
255
,
255
)):
...
...
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