Spaces:
Sleeping
Sleeping
Upload 608 files
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- app.py +361 -0
- images/README_rpc-cv-images.txt +10 -0
- images/_rps-cv-images/README_rpc-cv-images.txt +10 -0
- images/_rps-cv-images/paper/04l5I8TqdzF9WDMJ.png +0 -0
- images/_rps-cv-images/paper/0Og76sl5CJhbxWWx.png +0 -0
- images/_rps-cv-images/paper/0RA9rcrv8iVvuDDU.png +0 -0
- images/_rps-cv-images/paper/0Uomd0HvOB33m47I.png +0 -0
- images/_rps-cv-images/paper/0a3UtNzl5Ll3sq8K.png +0 -0
- images/_rps-cv-images/paper/0cb6cVL8pkfi4wF6.png +0 -0
- images/_rps-cv-images/paper/0eqArS2GgsBeqgSn.png +0 -0
- images/_rps-cv-images/paper/0t08v9bAaA0mXGCQ.png +0 -0
- images/_rps-cv-images/paper/0vugygEjxQJPr9yz.png +0 -0
- images/_rps-cv-images/paper/0zKU6wEhT2cDe9j0.png +0 -0
- images/_rps-cv-images/paper/14K62H4KG1hg5qiJ.png +0 -0
- images/_rps-cv-images/paper/1Dfw5FRlS4h60JPX.png +0 -0
- images/_rps-cv-images/paper/1Frbe8cdOdkciOBg.png +0 -0
- images/_rps-cv-images/paper/1Tt9U9SzrOm98Xtw.png +0 -0
- images/_rps-cv-images/paper/1fKclJk4eBWOQSR1.png +0 -0
- images/_rps-cv-images/paper/1jHtb93pI8f6pfKo.png +0 -0
- images/_rps-cv-images/paper/1oKnUgV2CdCaQUUX.png +0 -0
- images/_rps-cv-images/paper/1uoW7QcH2qAgCTxv.png +0 -0
- images/_rps-cv-images/paper/1yKjzquSvl9ShK7K.png +0 -0
- images/_rps-cv-images/paper/1yeoLbmp4alVOtFv.png +0 -0
- images/_rps-cv-images/paper/27XFtQjjXQ8AP8Tl.png +0 -0
- images/_rps-cv-images/paper/2DQbLQfHlfrcATqi.png +0 -0
- images/_rps-cv-images/paper/2F8Ng7620ANA7tEK.png +0 -0
- images/_rps-cv-images/paper/2IOsxsG8AaxntdJM.png +0 -0
- images/_rps-cv-images/paper/2OCAZGNv2OEzgAwU.png +0 -0
- images/_rps-cv-images/paper/2PAcPusQ59xIMfiw.png +0 -0
- images/_rps-cv-images/paper/2PiUTczN5Ez4VreF.png +0 -0
- images/_rps-cv-images/paper/2SldJqjiZwIVPef9.png +0 -0
- images/_rps-cv-images/paper/2UKnsncgPodQLOFR.png +0 -0
- images/_rps-cv-images/paper/2tDgPZGqbrw95j39.png +0 -0
- images/_rps-cv-images/paper/37PRV3B9HxuUPkQr.png +0 -0
- images/_rps-cv-images/paper/389udM70tLrMVL5H.png +0 -0
- images/_rps-cv-images/paper/3JN7OPsnxDBpcVeD.png +0 -0
- images/_rps-cv-images/paper/3K6a8bG8j1YTH1l0.png +0 -0
- images/_rps-cv-images/paper/3MMu7EXUtM6aEtXU.png +0 -0
- images/_rps-cv-images/paper/3XEQ73XMn7zaww2T.png +0 -0
- images/_rps-cv-images/paper/3YvRoN0ZGuXVWEbh.png +0 -0
- images/_rps-cv-images/paper/3sKeYzYsjbWQVhc4.png +0 -0
- images/_rps-cv-images/paper/3tNHP8R9YHru011u.png +0 -0
- images/_rps-cv-images/paper/3tyVmhojjwETaf1u.png +0 -0
- images/_rps-cv-images/paper/41HC0VBlHSRhi0AG.png +0 -0
- images/_rps-cv-images/paper/4484TuJc6AH7pDOG.png +0 -0
- images/_rps-cv-images/paper/45OQyZuXtfNCc8Rk.png +0 -0
- images/_rps-cv-images/paper/45ho1tx7W1LZB0DU.png +0 -0
- images/_rps-cv-images/paper/460WcktBwCAzsU0A.png +0 -0
- images/_rps-cv-images/paper/4Bimc2E5E9jTh1Fh.png +0 -0
- images/_rps-cv-images/paper/4Fxr7klOIfijCpio.png +0 -0
app.py
ADDED
@@ -0,0 +1,361 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# import streamlit as st
|
2 |
+
# import cv2
|
3 |
+
# import numpy as np
|
4 |
+
# from main.gesture import process_hand
|
5 |
+
|
6 |
+
# def main():
|
7 |
+
# st.title("Hand Gesture Recognition")
|
8 |
+
|
9 |
+
# run = st.button("run")
|
10 |
+
# FRAME_WINDOW = st.image([])
|
11 |
+
# EMOJI_PLACEHOLDER = st.empty()
|
12 |
+
|
13 |
+
# camera = cv2.VideoCapture(0)
|
14 |
+
# while run:
|
15 |
+
# _, frame = camera.read()
|
16 |
+
# frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
17 |
+
|
18 |
+
# processed_frame, gesture = process_hand(frame)
|
19 |
+
# FRAME_WINDOW.image(processed_frame)
|
20 |
+
# if gesture == "thums up":
|
21 |
+
# EMOJI_PLACEHOLDER.markdown("# 😊")
|
22 |
+
# elif gesture == "thumbs down":
|
23 |
+
# EMOJI_PLACEHOLDER.markdown("# 😔")
|
24 |
+
# elif gesture == "heart":
|
25 |
+
# EMOJI_PLACEHOLDER.markdown("# ❤️")
|
26 |
+
# else:
|
27 |
+
# EMOJI_PLACEHOLDER.empty()
|
28 |
+
|
29 |
+
# else:
|
30 |
+
# st.button("stop")
|
31 |
+
|
32 |
+
# if __name__ == "__main__":
|
33 |
+
# main()
|
34 |
+
|
35 |
+
|
36 |
+
# import cv2
|
37 |
+
# import numpy as np
|
38 |
+
# import mediapipe as mp
|
39 |
+
# import time
|
40 |
+
# import streamlit as st
|
41 |
+
|
42 |
+
# import random
|
43 |
+
# from main.gesture import process_hand
|
44 |
+
|
45 |
+
# def get_computer_choice():
|
46 |
+
# return random.choice(['rock', 'paper', 'scissors'])
|
47 |
+
|
48 |
+
# def determine_winner(player_choice, computer_choice):
|
49 |
+
# if player_choice == computer_choice:
|
50 |
+
# return "game is a tie"
|
51 |
+
# elif(player_choice == "rock" and computer_choice == "scissors") or \
|
52 |
+
# (player_choice == "scissors" and computer_choice == "paper") or \
|
53 |
+
# (player_choice == "paper" and computer_choice == "rock"):
|
54 |
+
# return "you win!"
|
55 |
+
|
56 |
+
# else:
|
57 |
+
# return "computer wins!"
|
58 |
+
|
59 |
+
|
60 |
+
# def main():
|
61 |
+
# st.title("Rock Paper Scissors Game")
|
62 |
+
# run = st.button('Run')
|
63 |
+
# FRAME_WINDOW = st.image([])
|
64 |
+
# RESULT_PLACEHOLDER = st.empty()
|
65 |
+
|
66 |
+
# camera = cv2.VideoCapture(0)
|
67 |
+
# player_score = 0
|
68 |
+
# computer_score = 0
|
69 |
+
# rounds_played = 0
|
70 |
+
# while run:
|
71 |
+
# _, frame = camera.read()
|
72 |
+
# frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
73 |
+
# process_image, gesture = process_hand(frame)
|
74 |
+
# FRAME_WINDOW.image(process_image)
|
75 |
+
|
76 |
+
# if gesture in ['rock', 'paper', 'scissors']:
|
77 |
+
# computer_choice = get_computer_choice()
|
78 |
+
# result = determine_winner(gesture, computer_choice)
|
79 |
+
|
80 |
+
# if result == "you win!":
|
81 |
+
# player_score += 1
|
82 |
+
# elif result == "computer wins!":
|
83 |
+
# computer_score += 1
|
84 |
+
# rounds_played += 1
|
85 |
+
|
86 |
+
# RESULT_PLACEHOLDER.markdown(f"""
|
87 |
+
# Your Choice: {gesture}
|
88 |
+
# Computer's Choice: {computer_choice}
|
89 |
+
# Result: {result}
|
90 |
+
# Score:
|
91 |
+
# You:{player_score}
|
92 |
+
# Computer:{computer_score}
|
93 |
+
# Rounds Played:{rounds_played}
|
94 |
+
# """)
|
95 |
+
# time.sleep(2)
|
96 |
+
|
97 |
+
# else:
|
98 |
+
# st.write('Game Stopped')
|
99 |
+
|
100 |
+
# if __name__ == "__main__":
|
101 |
+
# main()
|
102 |
+
|
103 |
+
# import streamlit as st
|
104 |
+
# import cv2
|
105 |
+
# import numpy as np
|
106 |
+
# from main.gesture import process_hand
|
107 |
+
# import random
|
108 |
+
# import time
|
109 |
+
|
110 |
+
# def get_computer_choice():
|
111 |
+
# return random.choice(["rock", "paper", "scissors"])
|
112 |
+
|
113 |
+
# def determine_winner(player_choice, computer_choice):
|
114 |
+
# if player_choice == computer_choice:
|
115 |
+
# return "It's a tie! 🤝"
|
116 |
+
# elif (player_choice == "rock" and computer_choice == "scissors") or \
|
117 |
+
# (player_choice == "scissors" and computer_choice == "paper") or \
|
118 |
+
# (player_choice == "paper" and computer_choice == "rock"):
|
119 |
+
# return "You win! 🎉"
|
120 |
+
# else:
|
121 |
+
# return "Computer wins! 💻"
|
122 |
+
|
123 |
+
# def get_emoji(choice):
|
124 |
+
# if choice == "rock":
|
125 |
+
# return "🪨"
|
126 |
+
# elif choice == "paper":
|
127 |
+
# return "📄"
|
128 |
+
# elif choice == "scissors":
|
129 |
+
# return "✂️"
|
130 |
+
# return ""
|
131 |
+
|
132 |
+
# def main():
|
133 |
+
# st.set_page_config(page_title="Rock Paper Scissors Game", page_icon="🎮", layout="wide")
|
134 |
+
|
135 |
+
# # Custom CSS
|
136 |
+
# st.markdown("""
|
137 |
+
# <style>
|
138 |
+
# .big-font {
|
139 |
+
# font-size:30px !important;
|
140 |
+
# font-weight: bold;
|
141 |
+
# }
|
142 |
+
# .medium-font {
|
143 |
+
# font-size:24px !important;
|
144 |
+
# }
|
145 |
+
# .centered {
|
146 |
+
# text-align: center;
|
147 |
+
# }
|
148 |
+
# .stButton>button {
|
149 |
+
# width: 200px;
|
150 |
+
# height: 60px;
|
151 |
+
# font-size: 24px;
|
152 |
+
# }
|
153 |
+
# </style>
|
154 |
+
# """, unsafe_allow_html=True)
|
155 |
+
|
156 |
+
# st.markdown("<h1 class='centered'>🪨📄✂️ Rock Paper Scissors Game 🎮</h1>", unsafe_allow_html=True)
|
157 |
+
|
158 |
+
# col1, col2 = st.columns(2)
|
159 |
+
|
160 |
+
# with col1:
|
161 |
+
# st.markdown("<p class='big-font centered'>Camera Feed</p>", unsafe_allow_html=True)
|
162 |
+
# FRAME_WINDOW = st.image([])
|
163 |
+
# run = st.checkbox('Start Game', value=False)
|
164 |
+
|
165 |
+
# with col2:
|
166 |
+
# st.markdown("<p class='big-font centered'>Game Status</p>", unsafe_allow_html=True)
|
167 |
+
# RESULT_PLACEHOLDER = st.empty()
|
168 |
+
# SCORE_PLACEHOLDER = st.empty()
|
169 |
+
|
170 |
+
# camera = cv2.VideoCapture(0)
|
171 |
+
|
172 |
+
# player_score = 0
|
173 |
+
# computer_score = 0
|
174 |
+
# rounds_played = 0
|
175 |
+
|
176 |
+
# while run:
|
177 |
+
# _, frame = camera.read()
|
178 |
+
# frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
179 |
+
|
180 |
+
# processed_frame, gesture = process_hand(frame)
|
181 |
+
|
182 |
+
# FRAME_WINDOW.image(processed_frame)
|
183 |
+
|
184 |
+
# if gesture in ["rock", "paper", "scissors"]:
|
185 |
+
# computer_choice = get_computer_choice()
|
186 |
+
# result = determine_winner(gesture, computer_choice)
|
187 |
+
|
188 |
+
# if "You win!" in result:
|
189 |
+
# player_score += 1
|
190 |
+
# elif "Computer wins!" in result:
|
191 |
+
# computer_score += 1
|
192 |
+
|
193 |
+
# rounds_played += 1
|
194 |
+
|
195 |
+
# RESULT_PLACEHOLDER.markdown(f"""
|
196 |
+
# <p class='medium-font centered'>
|
197 |
+
# Your choice: {get_emoji(gesture)} {gesture.capitalize()}<br>
|
198 |
+
# Computer's choice: {get_emoji(computer_choice)} {computer_choice.capitalize()}<br>
|
199 |
+
# Result: {result}
|
200 |
+
# </p>
|
201 |
+
# """, unsafe_allow_html=True)
|
202 |
+
|
203 |
+
# SCORE_PLACEHOLDER.markdown(f"""
|
204 |
+
# <p class='medium-font centered'>
|
205 |
+
# Score:<br>
|
206 |
+
# You: {player_score} 😊 | Computer: {computer_score} 💻<br>
|
207 |
+
# Rounds played: {rounds_played}
|
208 |
+
# </p>
|
209 |
+
# """, unsafe_allow_html=True)
|
210 |
+
|
211 |
+
# time.sleep(10) # Wait for 10 seconds before the next round
|
212 |
+
# else:
|
213 |
+
# st.write('Game stopped')
|
214 |
+
|
215 |
+
# if st.button('Reset Game'):
|
216 |
+
# player_score = 0
|
217 |
+
# computer_score = 0
|
218 |
+
# rounds_played = 0
|
219 |
+
# RESULT_PLACEHOLDER.empty()
|
220 |
+
# SCORE_PLACEHOLDER.empty()
|
221 |
+
|
222 |
+
# if __name__ == '__main__':
|
223 |
+
# main()
|
224 |
+
|
225 |
+
import streamlit as st
|
226 |
+
import cv2
|
227 |
+
import numpy as np
|
228 |
+
from main.gesture import process_hand
|
229 |
+
import random
|
230 |
+
import time
|
231 |
+
from threading import Thread
|
232 |
+
from queue import Queue
|
233 |
+
|
234 |
+
def get_computer_choice():
|
235 |
+
return random.choice(["rock", "paper", "scissors"])
|
236 |
+
|
237 |
+
def determine_winner(player_choice, computer_choice):
|
238 |
+
if player_choice == computer_choice:
|
239 |
+
return "It's a tie! 🤝"
|
240 |
+
elif (player_choice == "rock" and computer_choice == "scissors") or \
|
241 |
+
(player_choice == "scissors" and computer_choice == "paper") or \
|
242 |
+
(player_choice == "paper" and computer_choice == "rock"):
|
243 |
+
return "You win! 🎉"
|
244 |
+
else:
|
245 |
+
return "Computer wins! 💻"
|
246 |
+
|
247 |
+
def get_emoji(choice):
|
248 |
+
if choice == "rock":
|
249 |
+
return "🪨"
|
250 |
+
elif choice == "paper":
|
251 |
+
return "📄"
|
252 |
+
elif choice == "scissors":
|
253 |
+
return "✂️"
|
254 |
+
return ""
|
255 |
+
|
256 |
+
def video_capture_loop(cap, queue):
|
257 |
+
while True:
|
258 |
+
ret, frame = cap.read()
|
259 |
+
if not ret:
|
260 |
+
break
|
261 |
+
queue.put(frame)
|
262 |
+
|
263 |
+
def main():
|
264 |
+
st.set_page_config(page_title="Rock Paper Scissors Game", page_icon="🎮", layout="wide")
|
265 |
+
|
266 |
+
# Custom CSS (same as before)
|
267 |
+
st.markdown("""
|
268 |
+
<style>
|
269 |
+
.big-font {
|
270 |
+
font-size:30px !important;
|
271 |
+
font-weight: bold;
|
272 |
+
}
|
273 |
+
.medium-font {
|
274 |
+
font-size:24px !important;
|
275 |
+
}
|
276 |
+
.centered {
|
277 |
+
text-align: center;
|
278 |
+
}
|
279 |
+
.stButton>button {
|
280 |
+
width: 200px;
|
281 |
+
height: 60px;
|
282 |
+
font-size: 24px;
|
283 |
+
}
|
284 |
+
</style>
|
285 |
+
""", unsafe_allow_html=True)
|
286 |
+
|
287 |
+
st.markdown("<h1 class='centered'>🪨📄✂️ Rock Paper Scissors Game 🎮</h1>", unsafe_allow_html=True)
|
288 |
+
|
289 |
+
col1, col2 = st.columns(2)
|
290 |
+
|
291 |
+
with col1:
|
292 |
+
st.markdown("<p class='big-font centered'>Camera Feed</p>", unsafe_allow_html=True)
|
293 |
+
FRAME_WINDOW = st.image([])
|
294 |
+
run = st.checkbox('Start Game', value=False)
|
295 |
+
|
296 |
+
with col2:
|
297 |
+
st.markdown("<p class='big-font centered'>Game Status</p>", unsafe_allow_html=True)
|
298 |
+
RESULT_PLACEHOLDER = st.empty()
|
299 |
+
SCORE_PLACEHOLDER = st.empty()
|
300 |
+
|
301 |
+
cap = cv2.VideoCapture(0)
|
302 |
+
frame_queue = Queue(maxsize=1)
|
303 |
+
video_thread = Thread(target=video_capture_loop, args=(cap, frame_queue), daemon=True)
|
304 |
+
video_thread.start()
|
305 |
+
|
306 |
+
player_score = 0
|
307 |
+
computer_score = 0
|
308 |
+
rounds_played = 0
|
309 |
+
last_gesture_time = time.time()
|
310 |
+
gesture_cooldown = 10 # seconds
|
311 |
+
|
312 |
+
while run:
|
313 |
+
if not frame_queue.empty():
|
314 |
+
frame = frame_queue.get()
|
315 |
+
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
316 |
+
|
317 |
+
processed_frame, gesture = process_hand(frame)
|
318 |
+
|
319 |
+
FRAME_WINDOW.image(processed_frame)
|
320 |
+
|
321 |
+
current_time = time.time()
|
322 |
+
if gesture in ["rock", "paper", "scissors"] and current_time - last_gesture_time > gesture_cooldown:
|
323 |
+
computer_choice = get_computer_choice()
|
324 |
+
result = determine_winner(gesture, computer_choice)
|
325 |
+
|
326 |
+
if "You win!" in result:
|
327 |
+
player_score += 1
|
328 |
+
elif "Computer wins!" in result:
|
329 |
+
computer_score += 1
|
330 |
+
|
331 |
+
rounds_played += 1
|
332 |
+
last_gesture_time = current_time
|
333 |
+
|
334 |
+
RESULT_PLACEHOLDER.markdown(f"""
|
335 |
+
<p class='medium-font centered'>
|
336 |
+
Your choice: {get_emoji(gesture)} {gesture.capitalize()}<br>
|
337 |
+
Computer's choice: {get_emoji(computer_choice)} {computer_choice.capitalize()}<br>
|
338 |
+
Result: {result}
|
339 |
+
</p>
|
340 |
+
""", unsafe_allow_html=True)
|
341 |
+
|
342 |
+
SCORE_PLACEHOLDER.markdown(f"""
|
343 |
+
<p class='medium-font centered'>
|
344 |
+
Score:<br>
|
345 |
+
You: {player_score} 😊 | Computer: {computer_score} 💻<br>
|
346 |
+
Rounds played: {rounds_played}
|
347 |
+
</p>
|
348 |
+
""", unsafe_allow_html=True)
|
349 |
+
else:
|
350 |
+
st.write('Game stopped')
|
351 |
+
cap.release()
|
352 |
+
|
353 |
+
if st.button('Reset Game'):
|
354 |
+
player_score = 0
|
355 |
+
computer_score = 0
|
356 |
+
rounds_played = 0
|
357 |
+
RESULT_PLACEHOLDER.empty()
|
358 |
+
SCORE_PLACEHOLDER.empty()
|
359 |
+
|
360 |
+
if __name__ == '__main__':
|
361 |
+
main()
|
images/README_rpc-cv-images.txt
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
AUTHOR: Julien de la Bruère-Terreault ([email protected])
|
2 |
+
|
3 |
+
LICENSE: CC-BY-SA 4.0
|
4 |
+
|
5 |
+
DESCRIPTION: This dataset contains images of hand gestures from the Rock-Paper-Scissors game. The images were captured as part of a hobby project where I developped a Rock-Paper-Scissors game using computer vision and machine learning on the Raspberry Pi (https://github.com/DrGFreeman/rps-cv)
|
6 |
+
|
7 |
+
CONTENTS: The dataset contains a total of 2188 images corresponding to the 'Rock' (726 images), 'Paper' (710 images) and 'Scissors' (752 images) hand gestures of the Rock-Paper-Scissors game. All image are taken on a green background with relatively consistent ligithing and white balance.
|
8 |
+
|
9 |
+
FORMAT: All images are RGB images of 300 pixels wide by 200 pixels high in .png format. The images are separated in three sub-folders named 'rock', 'paper' and 'scissors' according to their respective class.
|
10 |
+
|
images/_rps-cv-images/README_rpc-cv-images.txt
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
AUTHOR: Julien de la Bruère-Terreault ([email protected])
|
2 |
+
|
3 |
+
LICENSE: CC-BY-SA 4.0
|
4 |
+
|
5 |
+
DESCRIPTION: This dataset contains images of hand gestures from the Rock-Paper-Scissors game. The images were captured as part of a hobby project where I developped a Rock-Paper-Scissors game using computer vision and machine learning on the Raspberry Pi (https://github.com/DrGFreeman/rps-cv)
|
6 |
+
|
7 |
+
CONTENTS: The dataset contains a total of 2188 images corresponding to the 'Rock' (726 images), 'Paper' (710 images) and 'Scissors' (752 images) hand gestures of the Rock-Paper-Scissors game. All image are taken on a green background with relatively consistent ligithing and white balance.
|
8 |
+
|
9 |
+
FORMAT: All images are RGB images of 300 pixels wide by 200 pixels high in .png format. The images are separated in three sub-folders named 'rock', 'paper' and 'scissors' according to their respective class.
|
10 |
+
|
images/_rps-cv-images/paper/04l5I8TqdzF9WDMJ.png
ADDED
images/_rps-cv-images/paper/0Og76sl5CJhbxWWx.png
ADDED
images/_rps-cv-images/paper/0RA9rcrv8iVvuDDU.png
ADDED
images/_rps-cv-images/paper/0Uomd0HvOB33m47I.png
ADDED
images/_rps-cv-images/paper/0a3UtNzl5Ll3sq8K.png
ADDED
images/_rps-cv-images/paper/0cb6cVL8pkfi4wF6.png
ADDED
images/_rps-cv-images/paper/0eqArS2GgsBeqgSn.png
ADDED
images/_rps-cv-images/paper/0t08v9bAaA0mXGCQ.png
ADDED
images/_rps-cv-images/paper/0vugygEjxQJPr9yz.png
ADDED
images/_rps-cv-images/paper/0zKU6wEhT2cDe9j0.png
ADDED
images/_rps-cv-images/paper/14K62H4KG1hg5qiJ.png
ADDED
images/_rps-cv-images/paper/1Dfw5FRlS4h60JPX.png
ADDED
images/_rps-cv-images/paper/1Frbe8cdOdkciOBg.png
ADDED
images/_rps-cv-images/paper/1Tt9U9SzrOm98Xtw.png
ADDED
images/_rps-cv-images/paper/1fKclJk4eBWOQSR1.png
ADDED
images/_rps-cv-images/paper/1jHtb93pI8f6pfKo.png
ADDED
images/_rps-cv-images/paper/1oKnUgV2CdCaQUUX.png
ADDED
images/_rps-cv-images/paper/1uoW7QcH2qAgCTxv.png
ADDED
images/_rps-cv-images/paper/1yKjzquSvl9ShK7K.png
ADDED
images/_rps-cv-images/paper/1yeoLbmp4alVOtFv.png
ADDED
images/_rps-cv-images/paper/27XFtQjjXQ8AP8Tl.png
ADDED
images/_rps-cv-images/paper/2DQbLQfHlfrcATqi.png
ADDED
images/_rps-cv-images/paper/2F8Ng7620ANA7tEK.png
ADDED
images/_rps-cv-images/paper/2IOsxsG8AaxntdJM.png
ADDED
images/_rps-cv-images/paper/2OCAZGNv2OEzgAwU.png
ADDED
images/_rps-cv-images/paper/2PAcPusQ59xIMfiw.png
ADDED
images/_rps-cv-images/paper/2PiUTczN5Ez4VreF.png
ADDED
images/_rps-cv-images/paper/2SldJqjiZwIVPef9.png
ADDED
images/_rps-cv-images/paper/2UKnsncgPodQLOFR.png
ADDED
images/_rps-cv-images/paper/2tDgPZGqbrw95j39.png
ADDED
images/_rps-cv-images/paper/37PRV3B9HxuUPkQr.png
ADDED
images/_rps-cv-images/paper/389udM70tLrMVL5H.png
ADDED
images/_rps-cv-images/paper/3JN7OPsnxDBpcVeD.png
ADDED
images/_rps-cv-images/paper/3K6a8bG8j1YTH1l0.png
ADDED
images/_rps-cv-images/paper/3MMu7EXUtM6aEtXU.png
ADDED
images/_rps-cv-images/paper/3XEQ73XMn7zaww2T.png
ADDED
images/_rps-cv-images/paper/3YvRoN0ZGuXVWEbh.png
ADDED
images/_rps-cv-images/paper/3sKeYzYsjbWQVhc4.png
ADDED
images/_rps-cv-images/paper/3tNHP8R9YHru011u.png
ADDED
images/_rps-cv-images/paper/3tyVmhojjwETaf1u.png
ADDED
images/_rps-cv-images/paper/41HC0VBlHSRhi0AG.png
ADDED
images/_rps-cv-images/paper/4484TuJc6AH7pDOG.png
ADDED
images/_rps-cv-images/paper/45OQyZuXtfNCc8Rk.png
ADDED
images/_rps-cv-images/paper/45ho1tx7W1LZB0DU.png
ADDED
images/_rps-cv-images/paper/460WcktBwCAzsU0A.png
ADDED
images/_rps-cv-images/paper/4Bimc2E5E9jTh1Fh.png
ADDED
images/_rps-cv-images/paper/4Fxr7klOIfijCpio.png
ADDED