창문 쇼핑을 멈추고 창문 쇼핑을 시작하자!
AI를 이용한 드롭핑 방법
- 
목표: AI를 이용해 창문 밖으로 모자를 떨어뜨려 뉴욕 시민들에게 제공하는 서비스 운영.
- 
필요한 것들: Raspberry Pi, Adafruit 스테퍼 모터, 실, Roboflow AI, 가벼운 제품(예: 프로펠러 모자).
창문 열기
- 
문제: 창문이 약 4인치밖에 열리지 않음.
- 
해결: 구글링을 통해 창문에 맞는 키를 찾아 해결.
모자 선택
- 
조건: 떨어질 때 다치지 않고, 교통에 방해되지 않는 모자.
- 
선택: 미래를 상징하고 아름답게 떨어지는 프로펠러 모자.
드롭핑 메커니즘
- 
구성: 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 모델의 정확도와 실시간 처리 성능이 중요함.
- 
유사 프로젝트: 드론 배송 서비스와 유사한 개념으로 확장 가능성 있음.
- 
사회적 영향: 도시 생활의 편리함을 증대시키는 동시에 새로운 형태의 상거래를 창출할 수 있음.