Emonet
Emonet
1
2
4 plt.figure(figsize=(8, 6))
5 sns.countplot(x='label', data=df)
6 plt.xlabel('Emotion', size=12)
7 plt.ylabel('Count', size=12)
8 plt.title('Distribution of Emotion
Labels', size=14)
9 plt.show()
5
• Neutral
• Surprised
• Sad
14 model.compile(loss='
categorical_crossentropy',
optimizer='adam', metrics=['
accuracy'])
15 model.summary()
its ability to capture long-term dependencies. problem and enable more effective training
(Referenced in Section "From Dataset" under of deep recurrent architectures. (Referenced in
"LSTM Model Definition") Section "From Dataset" under "LSTM Model
Definition")
3. Exploratory Data Analysis (EDA): EDA is
the process of analyzing and visualizing data to 7. Regularization: A set of techniques used to
gain insights and identify patterns or trends. It prevent overfitting in machine learning models.
involves techniques such as data visualization, Regularization methods introduce constraints
summary statistics, and hypothesis testing to on the model parameters to reduce complexity
understand the structure and characteristics of and encourage simpler solutions that general-
the dataset. (Referenced in Section "Results" ize well to unseen data. Common regulariza-
under "Data Analysis") tion techniques include L1 and L2 regulariza-
tion, dropout, and early stopping. (Referenced
4. Overfitting: Overfitting occurs when a ma- in Section "Results" under "Model Evalua-
chine learning model learns noise or irrelevant tion")
patterns from the training data and performs
poorly on unseen data. It typically happens 8. Serial Communication: The process of send-
when the model is too complex or has been ing data one bit at a time over a communication
trained for too many epochs, leading to high channel. In the context of Arduino program-
performance on the training set but poor gen- ming, serial communication is commonly used
eralization to new data. Regularization tech- for debugging purposes to send data from the
niques such as dropout and early stopping microcontroller to a computer for monitoring
are commonly used to mitigate overfitting. and analysis. (Referenced in Section "Project
(Referenced in Section "Results" under "Model Details" under "Setup")
Evaluation")
9. Adam Optimizer: Adam is an optimization
5. Recurrent Neural Network (RNN): A type of algorithm commonly used for training deep
neural network designed to handle sequential neural networks. It combines techniques such
data by maintaining a state or memory of as momentum and adaptive learning rates to
previous inputs. RNNs are suitable for tasks achieve efficient and effective optimization of
such as time series prediction, natural language model parameters. The Adam optimizer adapts
processing, and speech recognition. LSTM is the learning rate for each parameter based on
a specialized variant of RNNs designed to estimates of the first and second moments of
address the limitations of traditional RNNs the gradients, allowing it to converge quickly
in capturing long-term dependencies. (Refer- and handle noisy or sparse gradients effec-
enced in Section "From Dataset" under "LSTM tively. (Referenced in Section "From Dataset"
Model Definition") under "Model Training")
6. Vanishing Gradient Problem: A challenge 10. Analog Input/Output (A0): Analog pins on
encountered during the training of deep neu- microcontrollers like the Arduino Uno are used
ral networks, where gradients become increas- to read analog signals from sensors or output
ingly small as they are backpropagated through analog signals to devices. Analog inputs are
layers, leading to slow or ineffective learn- capable of measuring continuous voltage lev-
ing. This problem is particularly pronounced els, while analog outputs can generate variable
in traditional RNNs, limiting their ability to voltage levels to control analog devices. In the
capture long-range dependencies in sequen- context of the Arduino Uno, analog pins are
tial data. LSTM networks were specifically often used to interface with sensors such as po-
developed to mitigate the vanishing gradient tentiometers, temperature sensors, and sound
14
sensors. (Referenced in Section "Arduino Uno blue color may indicate low levels of detected
to Sound Sensor (KY-038)" under "Component sound, corresponding to relaxed or peaceful
Connections") emotions. (Referenced in Section "Arduino
Code Description" under "LED Color Func-
11. FastLED Library: FastLED is a popular Ar- tions")
duino library used for controlling address-
able LED strips and matrices. It offers high- 15. Analog Input: Analog input refers to a type of
performance functionality for controlling a signal or data representation that varies contin-
large number of LEDs with various color ef- uously over time within a certain range of val-
fects and animations. FastLED supports a wide ues. In the context of Arduino programming,
range of LED chipsets and provides optimized analog input typically involves reading data
code for smooth and efficient LED animations. from analog sensors such as potentiometers,
(Referenced in Section "Arduino Code De- light sensors, or sound sensors. The Arduino
scription" under "Setup") Uno’s analog input pins allow it to measure
analog voltages and convert them into digital
12. Pulsating Red Color: Pulsating red color values for processing. (Referenced in Section
refers to a visual effect where the intensity "Arduino Uno to Sound Sensor (KY-038)")
of red LEDs increases and decreases rhyth-
mically, creating a pulsating or breathing ef- 16. Digital Output: Digital output refers to a
fect. This effect is often used to represent type of signal or data representation that has
strong emotions or alert states in LED-based only two possible states: high (1) or low (0).
displays and visualizations. In the context of In Arduino programming, digital output pins
the real-time emotion detection system, pul- can be used to control digital devices such as
sating red color may indicate high levels of LEDs, motors, or relays by switching them on
detected sound, corresponding to intense emo- or off. The Arduino Uno’s digital output pins
tions. (Referenced in Section "Arduino Code provide a means of sending digital signals to
Description" under "LED Color Functions") external components for various applications.
(Referenced in Section "Arduino Uno to LED
13. Blinking Yellow Color: Blinking yellow color Strip")
refers to a visual effect where yellow LEDs
turn on and off rapidly, creating a blinking 17. Serial Communication: Serial communica-
or flashing pattern. This effect is commonly tion is a method of transmitting data between
used to draw attention or convey a warning in electronic devices one bit at a time over a
LED-based displays. In the real-time emotion communication channel or wire. In Arduino
detection system, blinking yellow color may programming, serial communication is com-
indicate moderate levels of detected sound, monly used for debugging, data logging, or
suggesting a state of caution or heightened interfacing with other devices such as com-
awareness. (Referenced in Section "Arduino puters or sensors. The Arduino Uno’s built-in
Code Description" under "LED Color Func- serial interface allows it to communicate with
tions") a computer via USB or with other Arduino
boards via serial ports. (Referenced in Section
14. Blinking Blue Color: Blinking blue color "Setup")
refers to a visual effect where blue LEDs
alternate between on and off states at a slower 18. CRGB: CRGB is a data type used in the
pace compared to blinking yellow. This effect FastLED library for representing RGB color
can convey a sense of calmness or tranquility values. It stands for "Color RGB" and is used
in LED-based displays. In the context of the to specify the intensity of red, green, and blue
real-time emotion detection system, blinking components in an RGB color model. CRGB
15
values range from 0 to 255 for each color be displayed. (Referenced in Section "Project
channel, allowing for a wide range of colors to Details" under "RGB LED Feedback")
be represented. In the context of the real-time
22. Sound Sensor Module: A sound sensor mod-
emotion detection system, CRGB values are
ule is an electronic component that detects
used to control the color of LEDs in the LED
sound waves in its surroundings and converts
strip. (Referenced in Section "Arduino Code
them into electrical signals. It typically con-
Description" under "LED Color Functions")
sists of a microphone or sound sensor element,
19. NUM_LEDS: NUM_LEDS is a constant or an amplifier, and output pins for transmitting
variable representing the total number of LEDs the detected sound levels to a microcontroller
in the LED strip. In the context of the Arduino or other electronic devices. In the real-time
code for the real-time emotion detection sys- emotion detection system, the sound sensor
tem, NUM_LEDS is used to specify the size module is used to capture ambient sound lev-
of the LED array and determine the number els, which are then processed by the Arduino
of LEDs that will be controlled by the Ar- Uno to classify emotions and control the LED
duino Uno. By defining this value, the code feedback. (Referenced in Section "Compo-
can ensure that the correct number of LEDs nents Used")
are addressed and manipulated according to
the detected emotion. (Referenced in Section
"Arduino Uno to LED Strip")