Shafeek Saleem commited on
Commit
0cb5452
1 Parent(s): 2e086e2
Files changed (3) hide show
  1. 0_Introduction.py +25 -40
  2. assets/quiz.json +53 -56
  3. pages/4_Trying It Out.py +1 -1
0_Introduction.py CHANGED
@@ -7,47 +7,32 @@ initialize_level()
7
 
8
  LEVEL = 0
9
 
10
- import cv2
11
-
12
-
13
-
14
  def intro_page():
15
- st.title("Webcam Live Feed")
16
- run = st.checkbox('Run')
17
- FRAME_WINDOW = st.image([])
18
- camera = cv2.VideoCapture(0)
19
-
20
- while run:
21
- _, frame = camera.read()
22
- frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
23
- FRAME_WINDOW.image(frame)
24
- else:
25
- st.write('Stopped')
26
- # st.header("Face Recognition")
27
- # st.subheader("Introduction")
28
-
29
- # st.write(
30
- # """
31
- # Welcome to the interactive tutorial on creating your very own Face Recognition Application!
32
- # """
33
- # )
34
- #
35
- # st.image(
36
- # "https://static.wixstatic.com/media/abb909_35aa4b27e4b840659a20fd69f0a18354~mv2.gif",
37
- # use_column_width=True,
38
- # )
39
- #
40
- # st.write(
41
- # """
42
- # In this tutorial, you will learn how to build a simple application that can detect and recognise faces from a given photo. Face recognition has revolutionized
43
- # various industries, including security, entertainment, and personal identification. Are you ready to dive into the exciting world of face recognition?
44
- # """
45
- # )
46
- #
47
- # st.info(f"Click on the button below to start the tutorial!")
48
- #
49
- # if st.button("I am Ready!"):
50
- # complete_level(LEVEL)
51
 
52
 
53
  render_page(intro_page, LEVEL)
 
7
 
8
  LEVEL = 0
9
 
 
 
 
 
10
  def intro_page():
11
+ st.header("Face Recognition")
12
+ st.subheader("Introduction")
13
+
14
+ st.write(
15
+ """
16
+ Welcome to the interactive tutorial on creating your very own Face Recognition Application!
17
+ """
18
+ )
19
+
20
+ st.image(
21
+ "https://static.wixstatic.com/media/abb909_35aa4b27e4b840659a20fd69f0a18354~mv2.gif",
22
+ use_column_width=True,
23
+ )
24
+
25
+ st.write(
26
+ """
27
+ In this tutorial, you will learn how to build a simple application that can detect and recognise faces from a given photo. Face recognition has revolutionized
28
+ various industries, including security, entertainment, and personal identification. Are you ready to dive into the exciting world of face recognition?
29
+ """
30
+ )
31
+
32
+ st.info(f"Click on the button below to start the tutorial!")
33
+
34
+ if st.button("I am Ready!"):
35
+ complete_level(LEVEL)
 
 
 
 
 
 
 
 
 
 
 
36
 
37
 
38
  render_page(intro_page, LEVEL)
assets/quiz.json CHANGED
@@ -1,92 +1,89 @@
1
  [
2
  {
3
- "question": "Which of the following best describes emotion detection?",
4
  "options": [
5
- "Teaching computers to understand human emotions",
6
- "Teaching humans to understand computer languages",
7
- "Teaching computers to create video games",
8
- "Teaching humans to recognize facial features"
9
  ],
10
- "answer": "Teaching computers to understand human emotions"
11
  },
12
  {
13
- "question": "What programming language is commonly used in developing emotion detection applications?",
14
  "options": [
15
- "Python",
16
- "Java",
17
- "C++",
18
- "Ruby"
19
  ],
20
- "answer": "Python"
21
  },
22
  {
23
- "question": "What is the purpose of OpenCV in an emotion detection application?",
24
- "options": [
25
- "To analyze and manipulate images and videos",
26
- "To recognize and understand human emotions",
27
- "To create graphical user interfaces",
28
- "To generate statistical reports"
29
- ],
30
- "answer": "To analyze and manipulate images and videos"
31
  },
32
  {
33
- "question": "Why is it important to have a diverse dataset when training an emotion detection model?",
34
  "options": [
35
- "It helps the model better understand different facial expressions",
36
- "It improves the performance of the computer's processor",
37
- "It makes the application run faster",
38
- "It reduces the training time for the model"
39
  ],
40
- "answer": "It helps the model better understand different facial expressions"
41
  },
42
  {
43
- "question": "What is the final step after training the model in an emotion detection application?",
44
  "options": [
45
- "Collect more data for training",
46
- "Test the model's accuracy and performance",
47
- "Install additional software plugins",
48
- "Optimize the application's user interface"
49
  ],
50
- "answer": "Test the model's accuracy and performance"
51
  },
52
  {
53
- "question": "How does the inference process work in an emotion detection application?",
54
  "options": [
55
- "It analyzes facial features and predicts the associated emotion",
56
- "It collects user feedback and improves the model's accuracy",
57
- "It converts emotions into numerical values for analysis",
58
- "It adjusts the application's settings based on user preferences"
59
  ],
60
- "answer": "It analyzes facial features and predicts the associated emotion"
 
 
 
 
 
61
  },
62
  {
63
- "question": "What is an example of a real-world application of emotion detection technology?",
64
  "options": [
65
- "Virtual reality gaming",
66
- "Weather forecasting",
67
- "Online shopping",
68
- "Recipe suggestions"
69
  ],
70
- "answer": "Virtual reality gaming"
71
  },
72
  {
73
- "question": "What is the importance of ethical considerations in emotion detection applications?",
74
  "options": [
75
- "Ensuring privacy and consent when collecting data",
76
- "Optimizing the application's performance",
77
- "Reducing the complexity of the model",
78
- "Enhancing the visual appearance of the application"
79
  ],
80
- "answer": "Ensuring privacy and consent when collecting data"
81
  },
82
  {
83
- "question": "What can students do to further explore and improve their emotion detection application?",
84
  "options": [
85
- "Experiment with different image preprocessing techniques",
86
- "Rewrite the entire code from scratch",
87
- "Avoid using real-time video feeds for testing",
88
- "Skip the testing phase and move directly to deployment"
89
  ],
90
- "answer": "Experiment with different image preprocessing techniques"
91
  }
92
  ]
 
1
  [
2
  {
3
+ "question": "What is face recognition?",
4
  "options": [
5
+ "The ability to detect emotions through facial expressions.",
6
+ "The process of identifying or verifying a person's identity through their facial features.",
7
+ "The act of analyzing facial beauty and attractiveness."
 
8
  ],
9
+ "answer": "The process of identifying or verifying a person's identity through their facial features."
10
  },
11
  {
12
+ "question": "Which technology is commonly used for face recognition?",
13
  "options": [
14
+ "Voice recognition",
15
+ "Fingerprint recognition",
16
+ "Iris recognition",
17
+ "All of the above"
18
  ],
19
+ "answer": "Iris recognition"
20
  },
21
  {
22
+ "question": "True or False: Face recognition can only be used for security purposes.",
23
+ "options": ["True", "False"],
24
+ "answer": "False"
 
 
 
 
 
25
  },
26
  {
27
+ "question": "What is the primary biometric characteristic used in face recognition?",
28
  "options": [
29
+ "Eye color",
30
+ "Facial hair",
31
+ "Facial structure",
32
+ "Skin color"
33
  ],
34
+ "answer": "Facial structure"
35
  },
36
  {
37
+ "question": "Which of the following is a potential application of face recognition technology?",
38
  "options": [
39
+ "Unlocking smartphones",
40
+ "Airport security",
41
+ "Monitoring attendance in schools",
42
+ "All of the above"
43
  ],
44
+ "answer": "All of the above"
45
  },
46
  {
47
+ "question": "What is the main advantage of face recognition over other biometric methods?",
48
  "options": [
49
+ "It is less expensive to implement.",
50
+ "It is more secure and accurate.",
51
+ "It can be easily altered or manipulated."
 
52
  ],
53
+ "answer": "It is more secure and accurate."
54
+ },
55
+ {
56
+ "question": "True or False: Face recognition systems work equally well for all individuals, regardless of race or ethnicity.",
57
+ "options": ["True", "False"],
58
+ "answer": "False"
59
  },
60
  {
61
+ "question": "What is the term used to describe the process of training a face recognition system to recognize specific individuals?",
62
  "options": [
63
+ "Calibration",
64
+ "Enrollment",
65
+ "Authorization",
66
+ "Validation"
67
  ],
68
+ "answer": "Enrollment"
69
  },
70
  {
71
+ "question": "Which of the following factors can affect the accuracy of face recognition systems?",
72
  "options": [
73
+ "Lighting conditions",
74
+ "Changes in facial appearance (e.g., aging, makeup)",
75
+ "Occlusions (e.g., wearing glasses, masks)",
76
+ "All of the above"
77
  ],
78
+ "answer": "All of the above"
79
  },
80
  {
81
+ "question": "How does face recognition technology work?",
82
  "options": [
83
+ "By analyzing the unique patterns in a person's eyes",
84
+ "By comparing the shape and structure of a person's face with stored templates",
85
+ "By measuring the temperature of a person's face"
 
86
  ],
87
+ "answer": "By comparing the shape and structure of a person's face with stored templates"
88
  }
89
  ]
pages/4_Trying It Out.py CHANGED
@@ -30,7 +30,7 @@ def step4_page():
30
  )
31
  # Select input type
32
  st.info("Select your input type to analyze!")
33
- input_type = st.radio("Select the Input Type", ["Image upload", "Camera", "Live Video"])
34
  # Put slide to adjust tolerance
35
  tolerance = st.slider("Tolerance", 0.0, 1.0, 0.5, 0.01)
36
  st.info(
 
30
  )
31
  # Select input type
32
  st.info("Select your input type to analyze!")
33
+ input_type = st.radio("Select the Input Type", ["Image upload", "Camera"])
34
  # Put slide to adjust tolerance
35
  tolerance = st.slider("Tolerance", 0.0, 1.0, 0.5, 0.01)
36
  st.info(