Skip to content

Commit b98712e

Browse files
committed
added my project to Utility Unleashed
1 parent cb8c1b9 commit b98712e

File tree

6 files changed

+1074
-0
lines changed

6 files changed

+1074
-0
lines changed

Utility Unleashed/SAM-main/README.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
2+
# SAM: Smart Autonomous Machine
3+
4+
SAM is an intelligent robot designed to enhance daily life with its remarkable capabilities. Powered by OpenAI's Davinci-002 engine, SAM combines conversational intelligence, facial recognition, and versatile functionalities to create a personalized, engaging, and helpful experience.
5+
6+
---
7+
8+
## Key Features
9+
10+
### 1. **Facial Recognition and Interaction**
11+
- Recognizes and interacts with individuals through advanced facial recognition.
12+
- Greets individuals with a handshake, offering a personalized and engaging experience.
13+
14+
### 2. **Conversational Abilities**
15+
- Equipped with natural language processing to engage in lifelike conversations.
16+
- Provides detailed and accurate responses on a variety of topics.
17+
- Utilizes OpenAI's API for dynamic, real-time conversational capabilities.
18+
19+
### 3. **Versatile Applications**
20+
- **Security Bot**:
21+
- Monitors homes or events for enhanced security.
22+
- Assists with real-time information and alerting.
23+
- **Hospitality**:
24+
- Enhances guest experiences in hotels and restaurants.
25+
- Assists staff by answering guest inquiries and providing directions.
26+
- **Information Assistance**:
27+
- Functions as an information kiosk in public spaces.
28+
- Provides guidance and support to visitors efficiently.
29+
30+
---
31+
32+
## Technical Details
33+
34+
### Core Components:
35+
- **Programming Languages**: Python
36+
- **Libraries**:
37+
- `face_recognition`: For advanced facial recognition.
38+
- `cv2 (OpenCV)`: For real-time video feed and facial interaction.
39+
- `pyttsx3`: For voice synthesis.
40+
- `speech_recognition`: For voice command input.
41+
- `openai`: To power conversational abilities.
42+
43+
### Project Files:
44+
- **`ccv.py`**: Real-time facial recognition script.
45+
- **`frec.py`**: Haar Cascade-based face detection script for efficient face tracking.
46+
- **`sam.py`**: Main script implementing SAM’s conversational engine, facial recognition, and versatile functionalities.
47+
48+
---
49+
50+
## How to Use SAM
51+
52+
1. **Setup**:
53+
- Install the required libraries:
54+
```bash
55+
pip install -r requirements.txt
56+
```
57+
- Place images of recognizable faces in the project directory and ensure proper naming for mapping.
58+
59+
2. **Run SAM**:
60+
- Start SAM’s core functionality by running `sam.py`:
61+
```bash
62+
python sam.py
63+
```
64+
65+
3. **Interact**:
66+
- Use voice commands or direct inputs for interaction.
67+
- SAM will respond, perform tasks, or provide assistance based on the given command.
68+
69+
---
70+
71+
## Future Prospects
72+
73+
SAM is not just a robot; it’s a companion and assistant. Its extensible design allows integration into various environments, from homes and offices to public spaces. Potential improvements include:
74+
- **Enhanced Mobility**: Integrating robotic arms or wheels for physical task execution.
75+
- **IoT Integration**: Connecting with smart home devices for better control and automation.
76+
- **Custom Personality Profiles**: Allowing users to tailor SAM’s interaction style to their preferences.
77+
78+
---
79+
80+
## Contributors
81+
- **Yashwanth K**@Yashwanss **Jeevan Suresh**
82+
83+
SAM is your friendly assistant, redefining what it means to have a truly intelligent machine in your life. Try it today and experience the future of robotics!
84+
85+
---
86+
87+
## A Note from the Creators
88+
89+
This project is a labor of passion and curiosity, and while every effort has been made to ensure the code is functional, there may still be imperfections. I apologize for any rough edges or inefficiencies in the code and would deeply appreciate your feedback and improvements.
90+
91+
---

Utility Unleashed/SAM-main/SAM.jpg

155 KB
Loading
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
api_data=""#Enter your open api key

Utility Unleashed/SAM-main/src/ccv.py

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import numpy as np
2+
import face_recognition as fr
3+
import cv2
4+
import time
5+
6+
video_capture = cv2.VideoCapture(0)
7+
8+
Jvn_image = fr.load_image_file("Me.jpg") # Rename Your Detected Face Photo as Me.jpg And Keep Both Python File And This File In The Same Script
9+
Jvn_face_encoding = fr.face_encodings(Jvn_image)[0]
10+
11+
known_face_encondings = [Jvn_face_encoding]
12+
known_face_names = ["Jeevan"] # Change It To Your Name
13+
14+
while True:
15+
ret, frame = video_capture.read()
16+
frame = cv2.rotate(frame, cv2.ROTATE_90_CLOCKWISE)
17+
18+
rgb_frame = frame[:, :, ::-1]
19+
20+
face_locations = fr.face_locations(rgb_frame)
21+
face_encodings = fr.face_encodings(rgb_frame, face_locations)
22+
23+
face_detected = False
24+
25+
for (top, right, bottom, left), face_encoding in zip(face_locations, face_encodings):
26+
27+
matches = fr.compare_faces(known_face_encondings, face_encoding)
28+
29+
name = "Unable To Recognize"
30+
31+
face_distances = fr.face_distance(known_face_encondings, face_encoding)
32+
33+
best_match_index = np.argmin(face_distances)
34+
if matches[best_match_index]:
35+
name = known_face_names[best_match_index]
36+
face_detected = True
37+
38+
cv2.rectangle(frame, (left, top), (right, bottom), (0, 0, 255), 2)
39+
40+
cv2.rectangle(frame, (left, bottom - 35), (right, bottom), (0, 0, 255), cv2.FILLED)
41+
font = cv2.FONT_HERSHEY_SIMPLEX
42+
cv2.putText(frame, name, (left + 6, bottom - 6), font, 1.0, (255, 255, 255), 1)
43+
44+
45+
46+
cv2.imshow('Face_Recognition', frame)
47+
k = cv2.waitKey(1) & 0xFF
48+
if k == 27:
49+
break
50+
51+
video_capture.release()
52+
cv2.destroyAllWindows()

0 commit comments

Comments
 (0)