Commit f2d9a019 authored by Sikhin VC's avatar Sikhin VC

camera 2

parent 78405ca9
...@@ -5,15 +5,15 @@ RUN apt-get install tzdata vim -y ...@@ -5,15 +5,15 @@ RUN apt-get install tzdata vim -y
RUN apt-get update && apt-get install tzdata ffmpeg libsm6 libxext6 -y RUN apt-get update && apt-get install tzdata ffmpeg libsm6 libxext6 -y
RUN pip3 install --upgrade pip RUN pip3 install --upgrade pip
RUN pip3 install matplotlib>=3.2.2 tensorboard>=2.4.1 numpy>=1.18.5 opencv-python>=4.1.2 Pillow>=7.1.2 PyYAML>=5.3.1 requests>=2.23.0 scipy>=1.4.1 torch>=1.7.0 torchvision>=0.8.1 tqdm>=4.41.0 pandas seaborn expiringdict minio cachetools #RUN pip3 install matplotlib>=3.2.2 tensorboard>=2.4.1 numpy>=1.18.5 opencv-python>=4.1.2 Pillow>=7.1.2 PyYAML>=5.3.1 requests>=2.23.0 scipy>=1.4.1 torch>=1.7.0 torchvision>=0.8.1 tqdm>=4.41.0 pandas seaborn expiringdict minio cachetools
RUN pip3 install pymongo Cython paho-mqtt==1.5.0 scikit-learn==0.22.2 #RUN pip3 install pymongo Cython paho-mqtt==1.5.0 scikit-learn==0.22.2
RUN pip3 install absl-py==1.3.0 asttokens==2.2.1 backcall==0.2.0 cachetools==5.2.0 certifi==2022.12.7 charset-normalizer==2.1.1 colorama==0.4.6 contourpy==1.0.6 RUN pip3 install absl-py==1.3.0 asttokens==2.2.1 backcall==0.2.0 cachetools==5.2.0 certifi==2022.12.7 charset-normalizer==2.1.1 colorama==0.4.6 contourpy==1.0.6
RUN pip3 install cycler==0.11.0 Cython==0.29.32 decorator==5.1.1 dnspython==2.2.1 executing==1.2.0 expiringdict==1.2.2 fonttools==4.38.0 RUN pip3 install cycler==0.11.0 Cython==0.29.32 decorator==5.1.1 dnspython==2.2.1 executing==1.2.0 expiringdict==1.2.2 fonttools==4.38.0
RUN pip3 install google-auth==2.15.0 google-auth-oauthlib==0.4.6 RUN pip3 install google-auth==2.15.0 google-auth-oauthlib==0.4.6
RUN pip3 install grpcio==1.51.1 idna==3.4 importlib-metadata==5.1.0 ipython jedi==0.18.2 kiwisolver==1.4.4 Markdown==3.4.1 MarkupSafe==2.1.1 matplotlib matplotlib-inline==0.1.6 minio==7.1.12 numpy>=1.18.5 RUN pip3 install grpcio==1.51.1 idna==3.4 importlib-metadata==5.1.0 ipython jedi==0.18.2 kiwisolver==1.4.4 Markdown==3.4.1 MarkupSafe==2.1.1 matplotlib matplotlib-inline==0.1.6 minio==7.1.12
RUN pip3 install oauthlib==3.2.2 opencv-python==4.6.0.66 packaging==22.0 paho-mqtt==1.6.1 pandas parso==0.8.3 pickleshare==0.7.5 Pillow==9.3.0 prompt-toolkit==3.0.36 protobuf==3.20.3 pure-eval==0.2.2 pyasn1==0.4.8 pyasn1-modules==0.2.8 Pygments==2.13.0 pymongo==4.3.3 pyparsing==3.0.9 python-dateutil==2.8.2 pytz==2022.6 PyYAML==6.0 requests==2.28.1 requests-oauthlib==1.3.1 rsa==4.9 scipy torch==1.9.0 torchvision==0.10.0 tqdm==4.64.1 traitlets==5.7.0 typing_extensions==4.4.0 urllib3==1.26.13 wcwidth==0.2.5 Werkzeug==2.2.2 zipp==3.11.0 RUN pip3 install oauthlib==3.2.2 opencv-python==4.6.0.66 packaging==22.0 paho-mqtt==1.6.1 pandas parso==0.8.3 pickleshare==0.7.5 Pillow==9.3.0 prompt-toolkit==3.0.36 protobuf==3.20.3 pure-eval==0.2.2 pyasn1==0.4.8 pyasn1-modules==0.2.8 Pygments==2.13.0 pymongo==4.3.3 pyparsing==3.0.9 python-dateutil==2.8.2 pytz==2022.6 PyYAML==6.0 requests==2.28.1 requests-oauthlib==1.3.1 rsa==4.9 scipy torch==1.9.0 torchvision==0.10.0 tqdm==4.64.1 traitlets==5.7.0 typing_extensions==4.4.0 urllib3==1.26.13 wcwidth==0.2.5 Werkzeug==2.2.2 zipp==3.11.0
RUN pip3 install seaborn psycopg2 RUN pip3 install seaborn psycopg2-binary scikit-learn==0.22.2 scipy>=1.4.1 numpy==1.21.6
ADD . /app ADD . /app
......
...@@ -443,7 +443,7 @@ class Ppe(ModelWrapper): ...@@ -443,7 +443,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
cur.execute(sql, [1, frame_count, datetime.datetime.now(), v]) cur.execute(sql, [2, frame_count, datetime.datetime.now(), v])
self.conn.commit() self.conn.commit()
cur.close() cur.close()
else: else:
...@@ -495,7 +495,7 @@ class Ppe(ModelWrapper): ...@@ -495,7 +495,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
cur.execute(sql, [1, frame_count, datetime.datetime.now(), v]) cur.execute(sql, [2, frame_count, datetime.datetime.now(), v])
self.conn.commit() self.conn.commit()
cur.close() cur.close()
...@@ -548,7 +548,7 @@ class Ppe(ModelWrapper): ...@@ -548,7 +548,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
cur.execute(sql, [1, frame_count, datetime.datetime.now(), v]) cur.execute(sql, [2, frame_count, datetime.datetime.now(), v])
self.conn.commit() self.conn.commit()
cur.close() cur.close()
......
...@@ -40,7 +40,7 @@ class MongoLogger: ...@@ -40,7 +40,7 @@ class MongoLogger:
try: try:
input_data = { input_data = {
"eventId": str(uuid1()).split('-')[0], "eventId": str(uuid1()).split('-')[0],
"cameraId": "1", "cameraId": "2",
"cameraName": self.camera_mapping_json.get(data['deviceId'], "Thermal Camera"), "cameraName": self.camera_mapping_json.get(data['deviceId'], "Thermal Camera"),
"timestamp": datetime.now(), "timestamp": datetime.now(),
"frame": data['frame'], "frame": data['frame'],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment