-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.py
25 lines (23 loc) · 1.31 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from application_files.pipeline.pipeline import Pipeline
import os
import sys
argument = sys.argv
file_path = os.path.join(os.getcwd(), 'input_video', 'input.mp4')
pipeline = Pipeline(os.getcwd(), file_path)
red_plate = 'HG53LLP'
if len(argument) == 2 and 'Video+Licence plate+Text' in argument[1]:
pipeline.pipeline(argument[1])
elif len(argument) == 3 and 'Video+Licence plate+Text' in argument[1] and ('mobile' in argument[2] or 'VGG' in argument[2]):
pipeline.pipeline(argument[1], argument[2])
elif len(argument) == 4 and 'Video+Licence plate+Text' in argument[1] and ('mobile' in argument[2] or 'VGG' in argument[2]):
pipeline.pipeline(argument[1], argument[2], argument[3])
elif len(argument) == 3 and 'Video+Licence plate+Text' in argument[1] and ~('mobile' in argument[2] or 'VGG' in argument[2]):
pipeline.pipeline(argument[1], None, argument[2])
elif len(argument) == 3 and 'Video+Licence plate' in argument[1] and ('mobile' in argument[2] or 'VGG' in argument[2]):
pipeline.pipeline(argument[1], argument[2])
elif len(argument) == 3 and 'Video+Licence plate' in argument[1] and ~('mobile' in argument[2] or 'VGG' in argument[2]):
pipeline.pipeline(argument[1])
elif len(argument) == 2 and 'Video' in argument[1]:
pipeline.pipeline(argument[1])
elif len(argument) == 1:
pipeline.pipeline('Video')