เลิก Window Shopping แล้วมาเริ่ม Window Shopping กันเถอะ!
วิธีดรอปด้วย AI
- เป้าหมาย: ให้บริการปล่อยหมวกออกไปนอกหน้าต่างด้วย AI เพื่อส่งให้ชาวนิวยอร์ก
- สิ่งที่ต้องมี: Raspberry Pi, สเต็ปเปอร์มอเตอร์ของ Adafruit, เชือก, Roboflow AI, และของที่มีน้ำหนักเบา (เช่น หมวกใบพัด)
การเปิดหน้าต่าง
- ปัญหา: หน้าต่างเปิดได้แค่ประมาณ 4 นิ้ว
- วิธีแก้: ค้น Google จนเจอกุญแจที่เหมาะกับหน้าต่างและแก้ปัญหาได้
การเลือกหมวก
- เงื่อนไข: ต้องเป็นหมวกที่ตกลงมาแล้วไม่ทำให้บาดเจ็บ และไม่รบกวนการจราจร
- ตัวเลือก: หมวกใบพัดที่สื่อถึงอนาคตและตกลงมาได้อย่างสวยงาม
กลไกการดรอป
- องค์ประกอบ: ใช้ Raspberry Pi และสเต็ปเปอร์มอเตอร์
- วิธีการ: พันเชือกเข้ากับสเต็ปเปอร์มอเตอร์แล้วให้มันขยับทีละน้อย
- โค้ด: โค้ดดรอปที่เขียนเป็นไฟล์ Python
import time
import board
import digitalio
enable_pin = digitalio.DigitalInOut(board.D18)
coil_A_1_pin = digitalio.DigitalInOut(board.D4)
coil_A_2_pin = digitalio.DigitalInOut(board.D17)
coil_B_1_pin = digitalio.DigitalInOut(board.D23)
coil_B_2_pin = digitalio.DigitalInOut(board.D24)
enable_pin.direction = digitalio.Direction.OUTPUT
coil_A_1_pin.direction = digitalio.Direction.OUTPUT
coil_A_2_pin.direction = digitalio.Direction.OUTPUT
coil_B_1_pin.direction = digitalio.Direction.OUTPUT
coil_B_2_pin.direction = digitalio.Direction.OUTPUT
enable_pin.value = True
def forward(delay, steps):
i = 0
while i in range(0, steps):
setStep(1, 0, 1, 0)
time.sleep(delay)
setStep(0, 1, 1, 0)
time.sleep(delay)
setStep(0, 1, 0, 1)
time.sleep(delay)
setStep(1, 0, 0, 1)
time.sleep(delay)
i += 1
def setStep(w1, w2, w3, w4):
coil_A_1_pin.value = w1
coil_A_2_pin.value = w2
coil_B_1_pin.value = w3
coil_B_2_pin.value = w4
forward(5, int(512))
AI
- เป้าหมาย: ตรวจจับแบบเรียลไทม์ว่ามีคนอยู่ใต้หน้าต่างหรือไม่
- วิธีการ: วิเคราะห์ภาพจากเว็บแคมแบบเรียลไทม์ และตรวจสอบว่ามีคนอยู่ในตำแหน่งที่กำหนดหรือไม่
- โมเดล: สร้างโมเดลตรวจจับวัตถุด้วย Roboflow
- โค้ด: โค้ดตรวจจับและดรอปที่เขียนเป็นไฟล์ Python
import cv2
import time
import paramiko
from inference_sdk import InferenceHTTPClient
CLIENT = InferenceHTTPClient(api_url="https://detect.roboflow.com", api_key="API_KEY")
def ssh_execute(host, port, username, password, command):
client = paramiko.SSHClient()
client.load_system_host_keys()
client.set_missing_host_key_policy(paramiko.WarningPolicy)
try:
client.connect(host, port=port, username=username, password=password)
stdin, stdout, stderr = client.exec_command(command)
print(stdout.read().decode().strip())
if stderr.read().decode().strip():
print('Error:', stderr)
finally:
client.close()
video = cv2.VideoCapture(0)
consec_detections = 0
while True:
ret, frame = video.read()
result = CLIENT.infer(frame, model_id="drop-of-a-a-hat/2")
if 'predictions' in result and len(result['predictions']) > 0:
consec_detections += 1
else:
consec_detections = 0
if consec_detections >= 3:
ssh_execute('raspberry.local', 22, 'pi', 'raspberry', 'python3 dropHat.py')
consec_detections = 0
time.sleep(1)
วิสัยทัศน์อันยิ่งใหญ่
- วิสัยทัศน์: โลกที่เมื่อเดินอยู่ในนิวยอร์ก สิ่งที่ต้องการทั้งหมดจะตกลงมาจากหน้าต่าง
- เป้าหมาย: สร้างตัวเองให้เป็นกรณีแรกของ "Window Shopping"
ความเห็นของ GN⁺
- จุดที่น่าสนใจ: เป็นโมเดลธุรกิจสร้างสรรค์ที่ผสาน AI และ IoT เข้าด้วยกัน
- สิ่งที่ควรพิจารณาก่อนนำไปใช้: ต้องตรวจสอบโครงสร้างหน้าต่างและประเด็นความปลอดภัยให้เพียงพอล่วงหน้า
- ความท้าทายทางเทคนิค: ความแม่นยำของโมเดล AI และประสิทธิภาพการประมวลผลแบบเรียลไทม์มีความสำคัญ
- โปรเจ็กต์ที่คล้ายกัน: มีโอกาสขยายแนวคิดต่อได้ในลักษณะใกล้เคียงกับบริการส่งของด้วยโดรน
- ผลกระทบต่อสังคม: อาจเพิ่มความสะดวกในชีวิตเมือง พร้อมสร้างรูปแบบการค้าแบบใหม่ไปพร้อมกัน
1 ความคิดเห็น
ความคิดเห็นจาก Hacker News