Jump to content

DeepStream Reference Designs/Customizing the Project/Implementing Custom Policies: Difference between revisions

m
no edit summary
No edit summary
 
mNo edit summary
Line 11: Line 11:


A policy is a structure where the user implements their business rules. To implement a new policy you must follow the next interface:
A policy is a structure where the user implements their business rules. To implement a new policy you must follow the next interface:
<br>
<br>
<br>
[[File:Policy-class-diagram-DS.png| 500px|center|thumb|General policy class diagram]]
[[File:Policy-class-diagram-DS.png| 500px|center|thumb|General policy class diagram]]
Line 28: Line 29:
== Code Example ==
== Code Example ==


The following is a simple example of how a basic policy should be implemented. For the explanation, the [https://developer.ridgerun.com/wiki/index.php/DeepStream_Reference_Designs/Reference_Designs/Automatic_Parking_Lot_Vehicle_Registration APLVR application] was taken as a base, which is explained in greater detail in the [https://developer.ridgerun.com/wiki/index.php/DeepStream_Reference_Designs/Reference_Designs Reference Designs] section. In this case, the information will be filtered by category and by threshold level.
The following is a simple example of how a basic policy should be implemented. For the explanation, the [[DeepStream_Reference_Designs/Reference_Designs/Automatic_Parking_Lot_Vehicle_Registration | APLVR application]] was taken as a base, which is explained in greater detail in the [[DeepStream_Reference_Designs/Reference_Designs | Reference Designs]] section. In this case, the information will be filtered by category and by threshold level.


First of all, the user should know which data the inference_info is going to receive in the dictionary, with that information you are going to create business rules. For instance, in the APLVR application the dictionary is:
First of all, the user should know which data the inference_info is going to receive in the dictionary, with that information you are going to create business rules. For instance, in the APLVR application the dictionary is:
Cookies help us deliver our services. By using our services, you agree to our use of cookies.