diff --git a/README.md b/README.md index 5c4c643..a7dd61c 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,7 @@ More information on contributing and the general code of conduct for discussion | Selfie with Python | [Selfie with Python](https://github.com/DhanushNehru/Python-Scripts/tree/master/Selfie%20with%20Python) | Take your selfie with python . | | Simple DDOS | [Simple DDOS](https://github.com/VanshajR/Python-Scripts/tree/master/Simple%20DDOS) | The code allows you to send multiple HTTP requests concurrently for a specified duration. | | Simple TCP Chat Server | [Simple TCP Chat Server](https://github.com/DhanushNehru/Python-Scripts/tree/master/TCP%20Chat%20Server) | Creates a local server on your LAN for receiving and sending messages! | +| Smart Attendance System | [Smart Attendance System](https://github.com/DhanushNehru/Python-Scripts/tree/master/Smart%20Attendance%20System) | This OpenCV framework is for Smart Attendance by actively decoding a student's QR Code. | Snake Water Gun | [Snake Water Gun](https://github.com/DhanushNehru/Python-Scripts/tree/master/Snake%20Water%20Gun) | A game similar to Rock Paper Scissors. | | Sorting | [Sorting](https://github.com/DhanushNehru/Python-Scripts/tree/master/Sorting) | Algorithm for bubble sorting. | | Star Pattern | [Star Pattern](https://github.com/DhanushNehru/Python-Scripts/tree/master/Star%20Pattern) | Creates a star pattern pyramid. | diff --git a/Smart Attendance System/.idea/.concept.txt b/Smart Attendance System/.idea/.concept.txt new file mode 100644 index 0000000..aed7c61 --- /dev/null +++ b/Smart Attendance System/.idea/.concept.txt @@ -0,0 +1,10 @@ +Now first we should have the students's data +We have name and roll number of the students stored in a data.csv +We will encode the each student's name(a string) into a qrcode + +In main.py + first we will read the data.csv and make a list of name and their rollnumber + By cv2 , If a student is present it will give his or her code to camera , we will + decode it and by decoding it we will get his or her name after that we will remove + his or her name from name list + Which names are left in list ,simple logic they are absent diff --git a/Smart Attendance System/README_smart_attendance_system.md b/Smart Attendance System/README_smart_attendance_system.md new file mode 100644 index 0000000..c7d6cc3 --- /dev/null +++ b/Smart Attendance System/README_smart_attendance_system.md @@ -0,0 +1,53 @@ +### Prerequisites + +Before you begin, ensure you have met the following requirements: + +* [Git](https://git-scm.com/downloads "Download Git") must be installed on your operating system. + +### Installation + +1. Clone this repo. + +To run **Smart Attendance System**, run this command on your git bash: + +Linux and macOS: + +```bash +sudo git clone https://github.com/raj-mistry-01/Computer-Vision.git +``` + +Windows: + +```bash +git clone https://github.com/raj-mistry-01/Computer-Vision.git +``` + +2. Navigate to Smart Attendance Folder + +3. Install required python packages + +```bash +pip install -r requirements +``` + +## What Is It (You can also read it in .idea folder) +Now first we should have the students's data +We have name and roll number of the students stored in a data.csv +We will encode the each student's name(a string) into a qrcode + +In main.py + first we will read the data.csv and make a list of name and their rollnumber + By cv2 , If a student is present it will give his or her code to camera , we will + decode it and by decoding it we will get his or her name after that we will remove + his or her name from name list + Which names are left in list ,simple logic they are absent + + +## Avoid A Comman Mistake : +In ```main.py``` the path of csv should be according your ```system``` + +### A Question In Your Mind (I know) : +If one student has all qrcode than it can also presents his all friends , but soon this ```code``` is going to be integretad by ```Face Recognization``` + +## Languages Used : +![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54) diff --git a/Smart Attendance System/code/main.py b/Smart Attendance System/code/main.py new file mode 100644 index 0000000..26b85ca --- /dev/null +++ b/Smart Attendance System/code/main.py @@ -0,0 +1,32 @@ +from pyzbar.pyzbar import decode +import cv2 +from PIL import Image +import csv + +cam = cv2.VideoCapture(0) + +students = [] +RollNumbers = [] +with open(r"path of csv","r") as file : + reader = csv.reader(file) + for row in reader : + students.append(row[1]) + RollNumbers.append(row[0]) + +while True : + _,frame = cam.read() + decodedframe = decode(frame) + try : + for qrcode in decodedframe : + name = decodedframe[0].data.decode() + if name in students : + RollNumbers.remove(RollNumbers[students.index(name)]) + students.remove(name) + except: + print("Error") + cv2.imshow("Attendace System",frame) + k = cv2.waitKey(100) & 0xff + if k==27: + break # press escape to close the loop +print(f"Absent Students Name : {students}.") +print(f"Absent Students Roll No : {RollNumbers}") diff --git a/Smart Attendance System/code/requirements.txt b/Smart Attendance System/code/requirements.txt new file mode 100644 index 0000000..e4e410a --- /dev/null +++ b/Smart Attendance System/code/requirements.txt @@ -0,0 +1,4 @@ +pyzbar == 0.1.9 +pillow == 10.2.0 +opencv-contrib-python == 4.9.0.80 +opencv-python == 4.9.0.80 diff --git a/Smart Attendance System/src/Anshul.jpg b/Smart Attendance System/src/Anshul.jpg new file mode 100644 index 0000000..777a26a Binary files /dev/null and b/Smart Attendance System/src/Anshul.jpg differ diff --git a/Smart Attendance System/src/Aryan.jpg b/Smart Attendance System/src/Aryan.jpg new file mode 100644 index 0000000..29fc1eb Binary files /dev/null and b/Smart Attendance System/src/Aryan.jpg differ diff --git a/Smart Attendance System/src/Ashish.jpg b/Smart Attendance System/src/Ashish.jpg new file mode 100644 index 0000000..30e276b Binary files /dev/null and b/Smart Attendance System/src/Ashish.jpg differ diff --git a/Smart Attendance System/src/Jainil.jpg b/Smart Attendance System/src/Jainil.jpg new file mode 100644 index 0000000..95c78e9 Binary files /dev/null and b/Smart Attendance System/src/Jainil.jpg differ diff --git a/Smart Attendance System/src/Parth.jpg b/Smart Attendance System/src/Parth.jpg new file mode 100644 index 0000000..3d64ebb Binary files /dev/null and b/Smart Attendance System/src/Parth.jpg differ diff --git a/Smart Attendance System/src/Sahil.jpg b/Smart Attendance System/src/Sahil.jpg new file mode 100644 index 0000000..c3c78ca Binary files /dev/null and b/Smart Attendance System/src/Sahil.jpg differ diff --git a/Smart Attendance System/src/csvExplain.txt b/Smart Attendance System/src/csvExplain.txt new file mode 100644 index 0000000..84d811a --- /dev/null +++ b/Smart Attendance System/src/csvExplain.txt @@ -0,0 +1,2 @@ +first column = Student's Roll Number +Second column = Student's Name diff --git a/Smart Attendance System/src/raj.jpg b/Smart Attendance System/src/raj.jpg new file mode 100644 index 0000000..aea9b42 Binary files /dev/null and b/Smart Attendance System/src/raj.jpg differ