Commit a1848085 authored by Sikhin VC's avatar Sikhin VC

frame count

parent eb58f210
......@@ -27,7 +27,7 @@ class FrameProcessor:
count += 1
logger.debug("Getting frame mask_model")
frame, count_1 = self.stream.read()
frame = self.stream.read()
if frame is not None and self.count % self.skip_frame_every == 0:
fid = uuid4()
......
......@@ -22,7 +22,7 @@ class FileVideoStream:
# initialize the queue used to store frames read from
# the video file
self.build_pipeline()
self.count_dict = {"count": 0}
# self.count_dict = {"count": 0}
......@@ -64,15 +64,15 @@ class FileVideoStream:
if not self.Q.full():
# read the next frame from the file
(grabbed, frame) = self.stream.read()
self.count += 1
self.count_dict["count"] = self.count
# self.count += 1
# self.count_dict["count"] = self.count
# if the `grabbed` boolean is `False`, then we have
# reached the end of the video file
if grabbed is False or frame is None:
#self.stopped = True
self.count = 0
self.count_dict["count"] = self.count
# self.count = 0
# self.count_dict["count"] = self.count
self.build_cv_obj()
continue
......@@ -102,7 +102,7 @@ class FileVideoStream:
def read(self):
# return next frame in the queue
return self.Q.get(), self.count_dict
return self.Q.get()
def get_frame_count(self):
# return next frame in the queue
......
......@@ -36539,3 +36539,9 @@ DETAIL: Failing row contains (4, 0, 2023-01-05 15:52:35.882488, null).
2023-01-05 19:01:55,141 INFO ilens-edge_engine [{'class': 'coverall suit', 'points': [792, 604, 853, 688], 'centroid': [822, 646]}, {'class': 'person', 'points': [791, 588, 858, 689], 'centroid': [824, 638]}, {'class': 'Safety helmet', 'points': [830, 591, 857, 624], 'centroid': [843, 607]}]
2023-01-05 19:01:55,652 INFO ilens-edge_engine [{'class': 'person', 'points': [779, 588, 858, 683], 'centroid': [818, 635]}, {'class': 'coverall suit', 'points': [779, 598, 870, 682], 'centroid': [824, 640]}, {'class': 'Safety helmet', 'points': [815, 590, 843, 626], 'centroid': [829, 608]}]
2023-01-05 19:01:56,003 INFO ilens-edge_engine [{'class': 'coverall suit', 'points': [772, 621, 826, 689], 'centroid': [799, 655]}, {'class': 'person', 'points': [771, 608, 828, 688], 'centroid': [799, 648]}, {'class': 'Safety helmet', 'points': [781, 609, 809, 643], 'centroid': [795, 626]}]
2023-01-06 15:58:08,187 INFO ilens-edge_engine building publishers
2023-01-06 15:58:09,678 INFO ilens-edge_engine Setting up frame processor !!
2023-01-06 15:59:04,783 INFO ilens-edge_engine building publishers
2023-01-06 15:59:05,026 INFO ilens-edge_engine Setting up frame processor !!
2023-01-06 15:59:05,545 INFO ilens-edge_engine []
2023-01-06 15:59:06,591 INFO ilens-edge_engine []
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