-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfall_detetctoin.py
More file actions
27 lines (22 loc) · 800 Bytes
/
fall_detetctoin.py
File metadata and controls
27 lines (22 loc) · 800 Bytes
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
26
27
import argparse
from utils import FeatureExtractor, KeyPoints
parser = argparse.ArgumentParser(description="Process a video. ")
parser.add_argument(
"--video", metavar="Video", help="The video to be processed", required=True
)
parser.add_argument(
"-m",
"--method",
metavar="Method",
help="The type of the cost calculated. Available methods: Division, MeanDifference, DifferenceMean, DifferenceSum, Mean",
nargs="?",
default="DifferenceMean",
const="DifferenceMean",
)
parser.add_argument(
"--save", action=argparse.BooleanOptionalAction, help="Save or not save the image"
)
args = parser.parse_args()
if __name__ == "__main__":
featureextractor = FeatureExtractor()
cost = featureextractor.realTimeVideo(str(args.video), str(args.method), args.save)