Skip to content

๐Ÿ“š๐ŸŽฅ SHELFREE sensor server provides information from sensors such as webcam face recognition and RFID readers over HTTP.

Notifications You must be signed in to change notification settings

nitic-pbl-p4/sensor-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

51 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“š Sensor-server

้ก”่ช่จผใจ 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

VSCode ๅ‘ใ‘ใฎ่จญๅฎš

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

HTTP GET /

{"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"}

About

๐Ÿ“š๐ŸŽฅ SHELFREE sensor server provides information from sensors such as webcam face recognition and RFID readers over HTTP.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages