Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2020-101
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sachith Fernando
2020-101
Commits
18054e0d
Commit
18054e0d
authored
Oct 18, 2020
by
SohanDanushka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Committing - adjusting coding standards 1
parent
690ea647
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
9 deletions
+1
-9
MonitorLecturerApp/logic/classroom_activity.py
MonitorLecturerApp/logic/classroom_activity.py
+1
-9
No files found.
MonitorLecturerApp/logic/classroom_activity.py
View file @
18054e0d
...
...
@@ -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_updated.h5"
)
# Disable scientific notation for clarity
np
.
set_printoptions
(
suppress
=
True
)
...
...
@@ -36,20 +33,15 @@ def activity_recognition(video_name):
metrics
=
[
'accuracy'
])
# 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
# determined by the first position in the shape tuple, in this case 1.
data
=
np
.
ndarray
(
shape
=
(
1
,
224
,
224
,
3
),
dtype
=
np
.
float32
)
size
=
(
224
,
224
)
# "C://Users//DELL//Downloads//Classroom_Video.mp4"
video1
=
'E:
\\
Studies
\\
SLIIT
\\
4th Year
\\
Python Projects
\\
classroom activity models
\\
videos
\\
{}'
.
format
(
video_name
)
video
=
cv2
.
VideoCapture
(
VIDEO_PATH
)
# additional
# getting the frames per second (fps)
# fps = video.get(cv2.CAP_PROP_FPS)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment