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
rahul
aart_ppe_detection
Commits
6f65abf6
Commit
6f65abf6
authored
Jan 25, 2023
by
rahul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update ppe.py
parent
310b078e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
scripts/ppe.py
scripts/ppe.py
+6
-6
No files found.
scripts/ppe.py
View file @
6f65abf6
...
@@ -502,7 +502,7 @@ class Ppe(ModelWrapper):
...
@@ -502,7 +502,7 @@ class Ppe(ModelWrapper):
# result = self.video_write(frame, unique_id)
# result = self.video_write(frame, unique_id)
requests
.
post
(
'http
://192.168.3.181:2328
/items/'
,
json
=
{
requests
.
post
(
'http
s://staging.unifytwin.com/record_video
/items/'
,
json
=
{
"rtsp"
:
"rtsp://admin:Admin@123@117.222.36.90:10556"
,
"rtsp"
:
"rtsp://admin:Admin@123@117.222.36.90:10556"
,
"name"
:
str
(
unique_id
)
"name"
:
str
(
unique_id
)
})
})
...
@@ -534,7 +534,7 @@ class Ppe(ModelWrapper):
...
@@ -534,7 +534,7 @@ class Ppe(ModelWrapper):
# present_event_id = 'SELECT "event_id" FROM aarti_violation_event_table'
# present_event_id = 'SELECT "event_id" FROM aarti_violation_event_table'
cur
=
self
.
conn
.
cursor
()
cur
=
self
.
conn
.
cursor
()
frame_count
=
self
.
frame_id
frame_count
=
self
.
frame_id
file_path
=
"/
home/administrator/aarti_violation_
videos/"
+
str
(
unique_id
)
+
".webm"
file_path
=
"/
app/
videos/"
+
str
(
unique_id
)
+
".webm"
cur
.
execute
(
sql
,
[
frame_count
,
1
,
str
(
unique_id
),
datetime
.
datetime
.
now
(),
file_path
,
v
])
cur
.
execute
(
sql
,
[
frame_count
,
1
,
str
(
unique_id
),
datetime
.
datetime
.
now
(),
file_path
,
v
])
self
.
conn
.
commit
()
self
.
conn
.
commit
()
cur
.
close
()
cur
.
close
()
...
@@ -654,7 +654,7 @@ class Ppe(ModelWrapper):
...
@@ -654,7 +654,7 @@ class Ppe(ModelWrapper):
# f.write(unique_id + ".webm")
# f.write(unique_id + ".webm")
# f.write("\n")
# f.write("\n")
# result = self.video_write(frame, unique_id)
# result = self.video_write(frame, unique_id)
requests
.
post
(
'http://
192.168.3.181:2328/items
/'
,
json
=
{
requests
.
post
(
'http://
staging.unifytwin.com/record_video
/'
,
json
=
{
"rtsp"
:
"rtsp://admin:Admin@123@117.222.36.90:10556"
,
"rtsp"
:
"rtsp://admin:Admin@123@117.222.36.90:10556"
,
"name"
:
str
(
unique_id
)
"name"
:
str
(
unique_id
)
})
})
...
@@ -682,7 +682,7 @@ class Ppe(ModelWrapper):
...
@@ -682,7 +682,7 @@ class Ppe(ModelWrapper):
cur
=
self
.
conn
.
cursor
()
cur
=
self
.
conn
.
cursor
()
# cur.execute("ROLLBACK")
# cur.execute("ROLLBACK")
frame_count
=
self
.
frame_id
frame_count
=
self
.
frame_id
file_path
=
"/
home/administrator/aarti_violation_
videos/"
+
str
(
unique_id
)
+
".webm"
file_path
=
"/
app/
videos/"
+
str
(
unique_id
)
+
".webm"
cur
.
execute
(
sql
,
[
frame_count
,
1
,
str
(
unique_id
),
datetime
.
datetime
.
now
(),
file_path
,
v
])
cur
.
execute
(
sql
,
[
frame_count
,
1
,
str
(
unique_id
),
datetime
.
datetime
.
now
(),
file_path
,
v
])
self
.
conn
.
commit
()
self
.
conn
.
commit
()
cur
.
close
()
cur
.
close
()
...
@@ -798,7 +798,7 @@ class Ppe(ModelWrapper):
...
@@ -798,7 +798,7 @@ class Ppe(ModelWrapper):
# f.write(unique_id + ".webm")
# f.write(unique_id + ".webm")
# f.write("\n")
# f.write("\n")
# result = self.video_write(frame, unique_id)
# result = self.video_write(frame, unique_id)
requests
.
post
(
'http://
192.168.3.181:2328/items
/'
,
json
=
{
requests
.
post
(
'http://
staging.unifytwin.com/record_video
/'
,
json
=
{
"rtsp"
:
"rtsp://admin:Admin@123@117.222.36.90:10556"
,
"rtsp"
:
"rtsp://admin:Admin@123@117.222.36.90:10556"
,
"name"
:
str
(
unique_id
)
"name"
:
str
(
unique_id
)
})
})
...
@@ -826,7 +826,7 @@ class Ppe(ModelWrapper):
...
@@ -826,7 +826,7 @@ class Ppe(ModelWrapper):
cur
=
self
.
conn
.
cursor
()
cur
=
self
.
conn
.
cursor
()
# cur.execute("ROLLBACK")
# cur.execute("ROLLBACK")
frame_count
=
self
.
frame_id
frame_count
=
self
.
frame_id
file_path
=
"/
home/administrator/aarti_violation_
videos/"
+
str
(
unique_id
)
+
".webm"
file_path
=
"/
app/
videos/"
+
str
(
unique_id
)
+
".webm"
cur
.
execute
(
sql
,
[
frame_count
,
1
,
str
(
unique_id
),
datetime
.
datetime
.
now
(),
file_path
,
v
])
cur
.
execute
(
sql
,
[
frame_count
,
1
,
str
(
unique_id
),
datetime
.
datetime
.
now
(),
file_path
,
v
])
self
.
conn
.
commit
()
self
.
conn
.
commit
()
cur
.
close
()
cur
.
close
()
...
...
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