Classify the object that crossed the line #463
-
Hello,
My output:
Thanks for you time |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
By |
Beta Was this translation helpful? Give feedback.
-
I guess you also have a classified model already trained. So you just have to crop the current frame to the dimension provided by the detection then send the crop to the classifier. I would strongly suggest to perform the classification async because if it is blocking, you will lose a lot of FPS. |
Beta Was this translation helpful? Give feedback.
-
In the current version the LineZone class is pretty lacking and it is hard to use. There is a PR for the next release which should improve things. But one thing for sure, you cannot use the detections as they include EVERYTHING that was detected in the frame. LineZone as a tracker_state dict which you can use. It stores the tracking_id and state (relative to the line). |
Beta Was this translation helpful? Give feedback.
Hi
I made some test and modified the class LineZone in line_counter the following way:
`class LineZone:
def init(self, start: Point, end: Point):
self.vector = Vector(start=start, end=end)
self.tracker_state: Dict[str, bool] = {}
self.in_count: int = 0
self.out_count: int = 0
self.in_count_car: int = 0
self.out_count_car: int = 0
self.in_count_truck: int = 0
self.out_count_truck: int = 0