Commit 18054e0d authored by SohanDanushka's avatar SohanDanushka

Committing - adjusting coding standards 1

parent 690ea647
...@@ -15,12 +15,9 @@ def activity_recognition(video_name): ...@@ -15,12 +15,9 @@ def activity_recognition(video_name):
# detector_path = os.path.join(CLASSIFIER_DIR, "keras_model.h5") # detector_path = os.path.join(CLASSIFIER_DIR, "keras_model.h5")
detector_path = os.path.join(CLASSIFIER_DIR, "keras_model_updated.h5") detector_path = os.path.join(CLASSIFIER_DIR, "keras_model_updated.h5")
# Disable scientific notation for clarity # Disable scientific notation for clarity
np.set_printoptions(suppress=True) np.set_printoptions(suppress=True)
...@@ -36,20 +33,15 @@ def activity_recognition(video_name): ...@@ -36,20 +33,15 @@ def activity_recognition(video_name):
metrics=['accuracy']) metrics=['accuracy'])
# Create the array of the right shape to feed into the keras model # Create the array of the right shape to feed into the keras model
# The 'length' or number of images you can put into the array is # The 'length' or number of images you can put into the array is
# determined by the first position in the shape tuple, in this case 1. # determined by the first position in the shape tuple, in this case 1.
data = np.ndarray(shape=(1, 224, 224, 3), dtype=np.float32) data = np.ndarray(shape=(1, 224, 224, 3), dtype=np.float32)
size = (224, 224) size = (224, 224)
# "C://Users//DELL//Downloads//Classroom_Video.mp4" # "C://Users//DELL//Downloads//Classroom_Video.mp4"
video1 = 'E:\\Studies\\SLIIT\\4th Year\\Python Projects\\classroom activity models\\videos\\{}'.format(video_name) video1 = 'E:\\Studies\\SLIIT\\4th Year\\Python Projects\\classroom activity models\\videos\\{}'.format(video_name)
video = cv2.VideoCapture(VIDEO_PATH) video = cv2.VideoCapture(VIDEO_PATH)
# additional # additional
# getting the frames per second (fps) # getting the frames per second (fps)
# fps = video.get(cv2.CAP_PROP_FPS) # fps = video.get(cv2.CAP_PROP_FPS)
......
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