You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
cjcho 29c179d52d 문서 업데이트 2 months ago
.ipynb_checkpoints 문서 업데이트 2 months ago
script 문서 업데이트 2 months ago
.gitignore . 2 months ago
Dockerfile first final 2 months ago
README.md 문서 업데이트 2 months ago
docker-compose.yml . 2 months ago
run.sh first final 2 months ago

README.md

개요

본 토이 프로젝트는 라즈베리파이 카메라에서 이미지를 수집하여, 소켓통신(UDP/TCP)를

통하여 웹서버로 전송하고, 웹 서버에서 pytorch 기반으로 구축된 keypoint rcnn(GTX 970 활용)을 통해

관절인식을 수행하여 Django 패키지를 통해 웹서비스 하는 것을 목표로 함.

장고 참고

파이썬 소켓통신 설명

소켓통신 코드 참고

라즈베리파이 환경 설정

[camera]

sudo raspi-config  > Interface Options > Camera

[화면 꺼짐]

sudo vi /etc/lightdm/lightdm.conf > xserver –commend=X –s 0 -dpms

[hangul]

sudo apt install fonts-unfonts-core

기본설정 > Raspberry Pi Configuation > Localisation > set Locale > Ko(Korean), UTF-8
apt remove ibus ibus-hangul
apt install fcitx fcitx-hangul
vi /etc/default/im-config
IM_CONFIG_DEFAULT_MODE = fcitx
sudo reboot

도커 설치

sudo apt update
sudo apt upgrade 
sudo reboot 
curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
sudo usermod -aG docker $(whoami)
sudo reboot 
sudo apt update 
sudo apt install python3 python3-pip
sudo pip install docker-compose
도커를 활용한 라즈베리파이 카메라 소켓통신 클라이언트 구축

docker file build

docker build -t rpy_img_tcp .

ip 수정

host와 port는 docker-compose.yml 파일에서 자신에 맞게 수정 필요

도커 이미지 로드

server에서 자동으로 실행 python3 script/socket_server.py 되게 되어 있음

# client (rpy or camera com)
docker-compose up –d
xhost +local:
관절인식 웹서비스 구축

web service(python/)

cd web_service
python manage.py runserver 0.0.0.0:8895# host:port는 자기에게 맞게
web_service/settings.py에서 ALLOWED_HOSTS 추가

## 참고
# django-admin startproject <프로젝트명>