Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
Smart Waste Management System
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
2022-292
Smart Waste Management System
Commits
5b7e8367
Commit
5b7e8367
authored
Oct 10, 2022
by
Rexsan12
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Model trained
parent
d2132dad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
+33
-0
frozen_inference_graph.pb
frozen_inference_graph.pb
+0
-0
headshots.py
headshots.py
+33
-0
No files found.
frozen_inference_graph.pb
0 → 100644
View file @
5b7e8367
File added
headshots.py
0 → 100644
View file @
5b7e8367
import
cv2
name
=
'Caroline'
#replace with your name
cam
=
cv2
.
VideoCapture
(
0
)
cv2
.
namedWindow
(
"press space to take a photo"
,
cv2
.
WINDOW_NORMAL
)
cv2
.
resizeWindow
(
"press space to take a photo"
,
500
,
300
)
img_counter
=
0
while
True
:
ret
,
frame
=
cam
.
read
()
if
not
ret
:
print
(
"failed to grab frame"
)
break
cv2
.
imshow
(
"press space to take a photo"
,
frame
)
k
=
cv2
.
waitKey
(
1
)
if
k
%
256
==
27
:
# ESC pressed
print
(
"Escape hit, closing..."
)
break
elif
k
%
256
==
32
:
# SPACE pressed
img_name
=
"dataset/"
+
name
+
"/image_{}.jpg"
.
format
(
img_counter
)
cv2
.
imwrite
(
img_name
,
frame
)
print
(
"{} written!"
.
format
(
img_name
))
img_counter
+=
1
cam
.
release
()
cv2
.
destroyAllWindows
()
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