forked from Shahrayar123/Python-Projects
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Shahrayar123#136 from s-dabral/master
Regarding issue Shahrayar123#73
- Loading branch information
Showing
11 changed files
with
221 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
## Face Recognition Attendance System | ||
|
||
This is a Python script that uses the OpenCV and face_recognition libraries to create a simple face recognition attendance system. It captures images from a camera, recognizes faces, and logs attendance in a CSV file. | ||
|
||
|
||
## Prerequisites | ||
|
||
Before running the code, you need to install the required Python libraries. You can install them using pip: | ||
|
||
- pip install opencv-python | ||
- pip install numpy | ||
- pip install face-recognition | ||
|
||
|
||
## Usage | ||
|
||
- Create a folder named 'Images' in the same directory as this script. | ||
- Add images of the individuals you want to recognize in the 'Images' folder. | ||
- The images should have only one face per image. | ||
- Run the script. | ||
|
||
|
||
## How it works | ||
|
||
- The script loads the known face encodings from the 'Images' folder. | ||
- It captures video from the default camera. | ||
- For each frame of video, it detects faces and encodes them. | ||
- It compares the encodings of detected faces with the known face encodings. | ||
- If a match is found, it records the name of the recognized person and the timestamp in the 'Attendance.csv' file. | ||
- The video stream is displayed with rectangles around the recognized faces and their names. | ||
|
||
## File Structure | ||
|
||
-- Images: Store images of individuals you want to recognize. | ||
-- Attendance.csv: Stores attendance records with name, time, and date. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
## Real-Time Color Drawing App | ||
|
||
|
||
This is a simple real-time color drawing application using OpenCV and Python. With this application, you can draw in various colors using your webcam. It detects the color of an object and allows you to draw with that color on the canvas. | ||
|
||
## Features | ||
|
||
- Choose from different colors (blue, green, red, and yellow) for drawing. | ||
- Clear the canvas with the "CLEAR" button. | ||
- Real-time color detection and drawing on the webcam feed. | ||
- Adjustable HSV (Hue, Saturation, Value) ranges for color detection. | ||
|
||
|
||
## Requirements | ||
|
||
- Python 3 | ||
- OpenCV (cv2) library | ||
- NumPy | ||
- Webcam | ||
|
||
|
||
## Usage | ||
|
||
- Clone or download this repository to your local machine. | ||
|
||
- Make sure you have Python and the required libraries installed. | ||
|
||
- Run the Python script using the following command: | ||
|
||
|
||
python color_drawing_app.py | ||
|
||
|
||
A window will open showing your webcam feed and the color drawing options. You can use the "CLEAR" button to clear the canvas or select different colors for drawing. | ||
|
||
- Adjust the HSV (Hue, Saturation, Value) trackbars to change the color detection parameters. | ||
|
||
- To exit the application, press the "q" key. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
## Conway's Game of Life in Python | ||
|
||
This is a simple implementation of Conway's Game of Life using Python and the Pygame library. | ||
|
||
## Description | ||
|
||
Conway's Game of Life is a cellular automaton devised by the British mathematician John Horton Conway in 1970. It is a zero-player game, meaning its evolution is determined by its initial state, requiring no further input. The game is played on a grid of cells, each of which can be alive or dead. The game progresses in steps, with each step following a set of rules to determine the state of each cell in the next generation. | ||
|
||
In this Python implementation, we've created a grid of cells on the screen. You can interact with the game by clicking on cells to bring them to life or kill them. Pressing the spacebar will start and stop the game's automatic progress. The game will evolve according to the rules of Conway's Game of Life. | ||
|
||
## Prerequisites | ||
|
||
- Python 3.x | ||
- Pygame library | ||
- You can install Pygame using pip: | ||
|
||
|
||
pip install pygame | ||
|
||
|
||
## Usage | ||
|
||
- Clone or download this repository to your local machine. | ||
- Open a terminal or command prompt and navigate to the directory containing the code. | ||
- Run the game by executing python conways_game_of_life.py. | ||
|
||
|
||
## Controls | ||
|
||
- Left mouse click: Toggle cell state (alive or dead). | ||
- Spacebar: Start or stop the automatic progression of the game. | ||
- Close the game window to exit. | ||
|
||
|
||
## Customization | ||
You can customize the game by modifying the following constants in the code: | ||
|
||
- COLOR_BG: Background color. | ||
- COLOR_GRID: Grid color. | ||
- COLOR_DIE_NEXT: Color of cells that will die in the next generation. | ||
- COLOR_ALIVE_NEXT: Color of cells that will survive in the next generation. | ||
- TICK_SPEED: Speed of the game's progression (frames per second). | ||
- cells = np.zeros((60, 80)): Initial state of the grid. You can change the grid size and initial configuration here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Dice Simulator | ||
|
||
This is a basic dice simluator implementation game. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## Dictionary APP | ||
|
||
This is a basic implementation of the dictionary app. | ||
|
||
Note: | ||
|
||
Following freatures are to be added here: | ||
|
||
1- is to make this program in such a way that if word not exist then do something | ||
2- also if user enter wrong word by mistake (for example if user want to enter ""happy"" but type "Haappyy") then do something | ||
3- task number 2 is with get_close_matches() for difflib library | ||
4- then make GUI application of this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
## Real-Time Face Detection using OpenCV and dlib | ||
|
||
|
||
## Introduction | ||
|
||
This Python script captures video from your webcam and detects faces in real-time using the OpenCV library and the dlib face detection model. | ||
|
||
## Getting Started | ||
|
||
To get started, you'll need to have Python and the following libraries installed: | ||
|
||
- OpenCV | ||
- dlib | ||
|
||
You can install these libraries using pip: | ||
|
||
|
||
pip install opencv-python | ||
pip install dlib | ||
|
||
|
||
## Usage | ||
- Clone this repository or download the script to your local machine. | ||
- Ensure that your webcam is connected and accessible. | ||
- Open a terminal or command prompt and navigate to the directory containing the script. | ||
- Run the script using the following command: | ||
|
||
python face_detection.py | ||
|
||
The script will open your webcam and start detecting faces in real-time. Detected faces will be highlighted with rectangles, and a number will be displayed on each detected face to indicate its order. | ||
|
||
## Exiting the Application | ||
|
||
To exit the application, simply press the 'q' key on your keyboard while the window displaying the webcam feed is in focus. | ||
|
||
## Dependencies | ||
OpenCV | ||
dlib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Number Guessing Game | ||
|
||
This is a basic Number Guessing Game implementation . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## QR Code generator | ||
|
||
This is a basic QR generator code implementation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Rock Paper Scissor Game | ||
|
||
This is a basic Rock Paper Scissor Game implementation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Snake game | ||
|
||
This is a basic snake game implementation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
## Screen Recording with Webcam Overlay | ||
|
||
This Python script allows you to record your screen while overlaying the webcam feed. It uses OpenCV for screen recording and capturing the webcam feed, and PyAutoGUI for taking screenshots. | ||
|
||
## Prerequisites | ||
|
||
Make sure you have the following libraries installed: | ||
|
||
- OpenCV (cv2) | ||
- NumPy (numpy) | ||
- PyAutoGUI (pyautogui) | ||
|
||
You can install these libraries using pip: | ||
|
||
|
||
pip install opencv-python numpy pyautogui | ||
|
||
|
||
## How to Use | ||
|
||
Run the script by executing python screen_recorder.py. | ||
|
||
The script will start recording your screen with a webcam overlay. You can adjust the parameters as needed in the script, such as the output file name ('video.avi'), codec ('XVID'), frame rate (20.0), and screen size. | ||
|
||
To stop the recording, press 'q'. | ||
|
||
The recorded video will be saved as video.avi in the current directory. | ||
|
||
## Customization | ||
|
||
You can customize the following parameters in the script: | ||
|
||
out: Change the output file name and codec. | ||
SCREEN_SIZE: Modify the screen size to match your display. | ||
frame rate: Adjust the frame rate to control the video quality and size. |