้ก่ช่จผใจ RFID ใซใใๆฌใฎ่ญๅฅใไฝฟใฃใ็กไบบๅณๆธ่ฒธๅบใทในใใ ใฎใใใฎใPython ใง่จ่ฟฐใใใๆจ่ซ็จใตใผใใผใงใใ
ใพใใpython
ๆฌไฝใจ Python ็จใฎไพๅญ้ขไฟใใใผใธใฃpoetry
ใๅฐๅ
ฅๆธใฟใชใใจใ็ขบ่ชใใฆไธใใใ
python --version # Python 3.11.3
poetry --version # Poetry (version 1.4.2)
ๆฌกใซใใใฎใชใใธใใชใใฏใญใผใณใใพใใใใ
git clone https://github.com/nitic-pbl-p4/sensor-server.git
cd sensor-server
ใใใฆใ้ก่ช่จผ็จใฉใคใใฉใชface_recognition
ใฎใใใซใdlib
ใใคใณในใใผใซใใพใใใใ
่ฉณใใ (MacOS or Ubuntu): https://gist.github.com/ageitgey/629d75c1baac34dfa5ca2a1928a7aeaf
่ฉณใใ (ไปใฎ็ฐๅข): https://github.com/ageitgey/face_recognition#installation
ๆๅพใซใpoetry
ใงใใฎใใญใธใงใฏใ็จใฎ Python ใฎไปฎๆณ็ฐๅขใไฝๆใใฆใใใฎๅพๅฟ
่ฆใชไพๅญ้ขไฟใใคใณในใใผใซใใพใใ
poetry shell
poetry install
ๆๅพใซใๅฎ่กใใพใใใใ
python sensor-server/main.py
Poetry ใไฝๆใใไปฎๆณ็ฐๅขใ VSCode ใฎ Python ๆกๅผตๆฉ่ฝใซ่ช่ญใใใใใใซใไปฅไธใฎ่จญๅฎใ่ฟฝๅ ใใฆไธใใใ่ฉณใใ: https://zenn.dev/pesuchin/articles/4c128aeb60cb42204311
ใใฎใณใใณใใงๅบๅใใใใในใใVSCode ใฎsettings.json
ใซ่ฟฝๅ ใใพใใใใ
poetry config virtualenvs.path # /Users/ReoHakase/Library/Caches/pypoetry/virtualenvs
{
"python.venvPath": "/Users/ReoHakase/Library/Caches/pypoetry/virtualenvs"
}
ใใญใธใงใฏใใซใผใไปฅไธใซใassets/<ๅไบบใฎId>/<ไปปๆใฎๅๅ>.(png|jpg|jpeg)
ใฎๅฝขๅผใง้
็ฝฎใใฆไธใใใ
.
โโโ assets
โ โโโ aung
โ โ โโโ IMG_6B07A8732E02-1.jpeg
โ โโโ maririhakuta
โ โ โโโ IMG_1314.jpg
โ โโโ reohakuta
โ โ โโโ IMG_1311.jpg
โ โโโ yutoinoue
โ โโโ IMG_1317.jpg
โโโ poetry.lock
โโโ pyproject.toml
โโโ README.md
โโโ sensor-server
โ โโโ __init__.py
โ โโโ main.py
โโโ tests
โโโ __init__.py
{"book":{"7663cf25":"2023-08-08T13:00:28.181921"},"person":{"id":"reohakuta","seenAt":"2023-08-08T13:00:26.958482"},"signature":"dvYOdXIZp9bOSm7o0gaPUEWfP96S5zWyJi2ZzQxUjhRgp4KktJy2Xx/sUtRn3hMkRjn3kb2qVz3DI+ePsOrYerrVa9j45dGvsra0P2dxXtd9gc9ifK43dL8Ku96LUIeNFj7jcVsRJ4qfLtR+Z3QADCt0uFFl+bG6eQr7+dYnfzbJV9e6ia2t+IZwYJ/fZrwgMa9xRZq2mfTrzYXlUDKiTbKitN7uNxT2oklaR2sMdLB/vNHsMt06uf/JtJZQxA5Cs4N4gEcLFlMrhqeBHuQRvj/3VsnJUWvHqJauXureTWOMaPuEfXMl42D+5e8I2FeHxm5AnPnE96T+SpihOZX4cQ==","timestamp":"2023-08-08T13:00:35.371409+09:00"}