๋„ค์ด๋ฒ„ ๋ธ”๋กœ๊ทธ ์ž๋™ ๊ณต๊ฐ ๋ˆ„๋ฅด๊ธฐ
ยท
๐Ÿ Python/Project
์ œ๋ชฉ ๊ทธ๋Œ€๋กœ๋‹ค. ๋„ค์ด๋ฒ„ ๋ธ”๋กœ๊ทธ๋„ ์ธ์Šคํƒ€, ํŠธ์œ„ํ„ฐ์ฒ˜๋Ÿผ ์ข‹์•„์š” ๋ฒ„ํŠผ์ด ์žˆ๋‹ค. ๋ฐ”๋กœ ๊ณต๊ฐํ•˜๊ธฐ ์ด๋‹ค. ๋ง ๊ทธ๋Œ€๋กœ ๋‚˜์™€ ์ด์›ƒ๋œ ๋ธ”๋กœ๊ฑฐ๋“ค์˜ ํฌ์ŠคํŒ…์— ๊ณต๊ฐ์„ ๋ˆŒ๋Ÿฌ์ฃผ๋Š” ๋งคํฌ๋กœ ํ”„๋กœ๊ทธ๋žจ์ด๋‹ค. ์•„๋ž˜ ์˜์ƒ์€ ๋ฐ๋ชจ์˜์ƒ์ด๋‹ค. https://youtu.be/1_RBb1bjl48?si=VR2HDsotghQVmPEj
๋„ค์ด๋ฒ„ ๋ธ”๋กœ๊ทธ ์„œ๋กœ ์ด์›ƒ ์ถ”๊ฐ€ ํ”„๋กœ๊ทธ๋žจ ver1.0, ver2.0
ยท
๐Ÿ Python/Project
์ €๋Š” ํ‹ฐ์Šคํ† ๋ฆฌ ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ ๋„ค์ด๋ฒ„ ๋ธ”๋กœ๊ทธ๋„ ์šด์˜ํ–ˆ๊ณ  ์š”์ƒˆ ์ •์‹ ์ด ์—†์–ด์„œ ํฌ์ŠคํŒ…์„ ๊ทธ๋งŒ ๋‘” ์ƒํƒœ์˜€์Šต๋‹ˆ๋‹ค. ์˜ค๋žœ๋งŒ์— ๋„ค์ด๋ฒ„ ๋ธ”๋กœ๊ทธ๋ฅผ ๋“ค์–ด ๊ฐ”๋Š”๋ฐ ์•„๋ž˜์™€ ๊ฐ™์ด ๋„ค์ด๋ฒ„์ธก์— ๊ฒฝ๊ณ ๋ฅผ ๋ฐ›์•˜์Šต๋‹ˆ๋‹ค. ํ•˜๋‚˜๊ฐ€ ์•„๋‹ˆ๋ผ ์—ฌ๋Ÿฌ ๊ธ€์— ๋Œ€ํ•ด์„œ ๊ฒฝ๊ณ ๋ฅผ ๋ฐ›์Œ... ๋„ค์ด๋ฒ„ ๋ธ”๋กœ๊ทธ ์„œ๋กœ ์ด์›ƒ์„ ์ถ”๊ฐ€ํ•ด์ฃผ๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ๋ฒ„์ „ ๋ณ„๋กœ ์ •๋ฆฌํ•ด์„œ ํฌ์ŠคํŒ…ํ–ˆ๋Š”๋ฐ ๊ทธ๊ฑธ ์ „๋ถ€ ๋น„๊ณต๊ฐœ ์ฒ˜๋ฆฌ๊ฐ€ ๋œ ๊ฒƒ. ์ž‘๋…„์— ๋งŒ๋“  ํ”„๋กœ๊ทธ๋žจ์ด์ง€๋งŒ, ๋งŒ๋“ค์–ด ๋†“์€๊ฒŒ ์•„๊นŒ์›Œ์„œ ํ‹ฐ์Šคํ† ๋ฆฌ์— ์˜ฌ๋ฆฌ๊ธฐ๋กœ ํ–ˆ์Šต๋‹ˆ๋‹ค. ๋„ค์ด๋ฒ„ ๋ธ”๋กœ๊ทธ ์„œ๋กœ์ด์›ƒ ์ถ”๊ฐ€ ํ”„๋กœ๊ทธ๋žจ ver1.2 ๋กœ์ปฌ์„ ์ฐพ์•„๋ณด๋‹ˆ ์ดˆ๊ธฐ ๋ฒ„์ „์„ ์ฐพ์„ ์ˆ˜ ์žˆ์—ˆ์Œ. QT๋ฅผ ์ด์šฉํ•ด ์˜ค๋ฐ€์กฐ๋ฐ€ํ•˜๊ฒŒ ํ•œ ๋ ˆ์ด์•„์›ƒ์—์„œ ์ „๋ถ€ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋งŒ๋“ค์—ˆ์—ˆ์Œ. ์ € ๋•Œ๋Š” ์‚ฌ์šฉ์•ˆํ•˜๋Š” ๋„ค์ด๋ฒ„ ๊ณ„์ •์œผ๋กœ ํ…Œ์ŠคํŠธํ–ˆ๋˜ ๊ฒƒ์„ ์•Œ ์ˆ˜ ์žˆ์Œ. ๋„ค์ด๋ฒ„ ๋ธ”๋กœ๊ทธ ์„œ๋กœ์ด์›ƒ ์ถ”๊ฐ€ ํ”„๋กœ๊ทธ๋žจ ve..
[Python] ํŒŒ์ด์ฌ์ด ์ตœ๊ณ ์˜ ์–ธ์–ด๊ฐ€ ์•„๋‹Œ ์ด์œ  10๊ฐ€์ง€
ยท
๐Ÿ Python/Basic
ํŒŒ์ด์ฌ์„ ๋ˆ„๊ตฌ๋ณด๋‹ค ์ข‹์•„ํ•˜๊ณ  ์• ์šฉํ•˜๋Š” ์‚ฌ๋žŒ์ด์ง€๋งŒ ํŒŒ์ด์ฌ์ด ์ตœ๊ณ ์˜ ์–ธ์–ด๊ฐ€ ๋  ์ˆ˜ ์—†๋Š” 10๊ฐ€์ง€ ์ด์œ ๋ฅผ ์ด์•ผ๊ธฐํ•ด๋ณด๋ ค ํ•œ๋‹ค. ํ•˜์ง€๋งŒ ์น˜๋ช…์ ์ธ 10๊ฐ€์ง€ ๋‹จ์ ์ด ์žˆ์Œ์—๋„ ๋ถˆ๊ตฌํ•˜๊ณ  ์ „ ์„ธ๊ณ„ ๋„๋ฆฌ ์‚ฌ์šฉ๋˜๋Š” ๊ฑธ ๋ณด๋ฉด ๋Œ€๋‹จํ•œ ์–ธ์–ด์ž„์— ํ‹€๋ฆผ์—†๋‹ค. 1. Indentation ์ฃผ์˜ํ•  ์ ์€ Python์—์„œ๋Š” Indentation์ด ์„ ํƒ์‚ฌํ•ญ์ด ์•„๋‹ˆ๋ผ๋Š” ๊ฒƒ์ด๋‹ค. ์ด๋Š” If๋ฌธ, for๋ฌธ ์‚ฌ์šฉ ์‹œ ๋ฌธ์ œ๋ฅผ ์ผ์œผํ‚จ๋‹ค. ๋˜ํ•œ ํ•จ์ˆ˜๊ฐ€ ์–ด๋””์—์„œ ๋๋‚˜๋Š”์ง€ ์ž˜ ๋ณด์ด์ง€ ์•Š๋Š”๋‹ค. 2. Multiple version Python์—๋Š” Python 2์™€ Python 3์˜ ๋‘ ๊ฐ€์ง€ ๋ฒ„์ „์ด ์žˆ๋‹ค.๋Œ€๋ถ€๋ถ„์˜ ๊ฒฝ์šฐ Linux์—์„œ ์„œ๋กœ ๋‚˜๋ž€ํžˆ ์„ค์น˜๋˜์–ด ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ๋งŽ์€ Linux distribution์—์„œ Python 3์œผ๋กœ ๋ณ€ํ™˜ํ•˜๋Š” ๋ฐ ์‹œ๊ฐ„์ด ๊ฑธ๋ฆฌ๋ฏ€๋กœ ๋‘ ๊ฐ€์ง€ ๋ฒ„์ „..
[Debug] Pyinstaller .exeํŒŒ์ผ ์ž๋™ ๊บผ์ง ํ˜„์ƒ, pyfiglet fonts ํ•ด๊ฒฐ (No module named 'pyfiglet.fonts')
ยท
๐Ÿ Python/Debug
Pyinstaller๋Š” python ์ฝ”๋“œ๋ฅผ exe ํŒŒ์ผ๋กœ ๋ณ€ํ™˜ํ•˜๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์ด๋‹ค. ์‚ฌ์šฉ๋ฒ•์€ ์•„๋ž˜์™€ ๊ฐ™๋‹ค. # main.py from pyfiglet import Figlet f = Figlet(font='slant') print(f.renderText('Python')) # pyinstaller -w -F --icon {icon.ico} main.py pyinstaller -F .\main.py -w : ์ฝ˜์†”์ฐฝ ์ถœ๋ ฅํ•˜์ง€ ์•Š์Œ -F : ์‹คํ–‰ํŒŒ์ผ ํ•˜๋‚˜๋งŒ ์ƒ์„ฑ -icon : icon ๋ชจ์–‘ ์œ„ ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•˜๋ฉด No module named 'pyfiglet.fonts' ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•˜๋ฉด์„œ ์ฝ˜์†”์ฐฝ์ด ์ž๋™์œผ๋กœ ์ข…๋ฃŒ๋œ๋‹ค. ์˜ค๋ฅ˜๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์•„๋ž˜์ฒ˜๋Ÿผ ์ˆ˜ํ–‰ํ•˜๋ฉด ํ•ด๊ฒฐ๋œ๋‹ค. pyinstaller --add-data " .\{P..
[Pytorch] Conv1D + LSTM ๋ชจ๋ธ Pytorch ๊ตฌํ˜„
ยท
๐Ÿ Python/Deep Learning
๊ทธ๋ฆผ ์ฐธ๊ณ  1: Early Warning Model of Wind Turbine Front Bearing Based on Conv1D and LSTM | IEEE Conference Publication | IEEE Xplore ๊ทธ๋ฆผ ์ฐธ๊ณ  2: Understanding 1D and 3D Convolution Neural Network | Keras | by Shiva Verma | Towards Data Science 1. ๋ฐ์ดํ„ฐ์…‹ ๊ฐ€์ • Batch size : 100000 Sequence : 10 Feature : 3 (x-axis, y-axis, z-axis) Dataset shape : (100000, 10, 3) = (Batch size, Sequence, Feature) = (B, S, F) 2...
[๋”ฅ๋Ÿฌ๋‹] ๋”ฅ๋Ÿฌ๋‹ ๋ชจ๋ธ์„ ๊ฐ„๋‹จํ•˜๊ฒŒ ์‹œ๊ฐํ™”ํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ, Netron | Pytorch, ONNX
ยท
๐Ÿ Python/Deep Learning
์˜ค๋Š˜์€ ์ž์‹ ์ด ์ง์ ‘ ๋””์ž์ธํ•œ ๋”ฅ๋Ÿฌ๋‹ ๋ชจ๋ธ์„ ์‹œ๊ฐํ™”ํ•˜๋Š” ์ž‘์—…์„ ํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ์šฐ์„ , Pytorch๋กœ ๊ตฌํ˜„๋œ ๋ชจ๋ธ์„ ONNX๋กœ ์ €์žฅํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. Pytorch๋กœ ONNX๋กœ ์ €์žฅํ•˜๊ธฐ ์œ„ํ•ด์„œ ์•„๋ž˜ ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค. pip install onnx-pytorch ์„ค์น˜๋ฅผ ์™„๋ฃŒ ํ›„, ์ž์‹ ์ด ๊ตฌํ˜„ํ•œ ๋ชจ๋ธ์˜ ๊ฐ์ฒด๊ฐ€ ์žˆ๋‹ค๋ฉด, ์•„๋ž˜ ์ฝ”๋“œ๋ฅผ ํ†ตํ•ด ๋ชจ๋ธ์„ ์ €์žฅํ•ฉ๋‹ˆ๋‹ค. import torch.onnx input_names = ['Time series data'] output_names = ['Output'] x = torch.zeros(1, 10, 6).to(device) torch.onnx.export(model, x, 'regression_mode.onnx', input_names=input_names, output_..
[Deep Learning] ๋ถ„๋ฅ˜ ํ•™์Šต์„ ์œ„ํ•ด ๊ณจ๊ณ ๋ฃจ ํ›ˆ๋ จ ๋ฐ ํ…Œ์ŠคํŠธ ๋ฐ์ดํ„ฐ์…‹ ๋ถ„ํ• ํ•˜๋Š” ๋ฐฉ๋ฒ•
ยท
๐Ÿ Python/Deep Learning
์˜ฌ๋ฐ”๋ฅธ ๋ถ„๋ฅ˜ ๋ชจ๋ธ์„ ํ•™์Šต์‹œํ‚ค๊ธฐ ์œ„ํ•ด ๋ฐ์ดํ„ฐ์…‹์„ ๊ณจ๊ณ ๋ฃจ ๋ถ„ํ• ํ•˜๋Š” ๊ฒƒ์ด ์ค‘์š”ํ•˜๋‹ค. https://github.com/ewine-project/UWB-LOS-NLOS-Data-Set GitHub - ewine-project/UWB-LOS-NLOS-Data-Set: Repository with UWB data traces representing LOS and NLOS channel conditions in 7 Repository with UWB data traces representing LOS and NLOS channel conditions in 7 different indoor locations. - GitHub - ewine-project/UWB-LOS-NLOS-Data-Set: Repository wi..
[ํŒŒ์ด์ฌ ํ”„๋กœ์ ํŠธ] Python Struct (feat.c์–ธ์–ด)
ยท
๐Ÿ Python/Project
์•ˆ๋…•ํ•˜์„ธ์š”. ์š”์ฆ˜ LoRa์—์„œ End Device์—์„œ ๋ฐ”์ดํŠธํ˜•์‹์œผ๋กœ ์˜ค๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ํŒŒ์‹ฑํ•˜๊ธฐ ์œ„ํ•ด bytearray๋กœ ๊ณจ๋จธ๋ฆฌ๋ฅผ ์ฉ๊ณ  ์žˆ๋Š”๋ฐ, ์—ฐ๊ตฌ์‹ค ํ˜•๋‹˜์ด Python Struct์„ ์ถ”์ฒœํ•ด์„œ ์•Œ๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. Python์ด ๊ต‰์žฅํžˆ ์ž˜ ๋งŒ๋“  ์–ธ์–ด์ด์ง€๋งŒ, ๋ฐ”์ดํŠธ๋‚˜ ๋น„ํŠธ๋ฅผ ์ฒ˜๋ฆฌํ•˜๊ธฐ์—๋Š” ๋„ˆ๋ฌด ๊นŒ๋‹ค๋กญ์Šต๋‹ˆ๋‹ค. bytearray๋ฅผ ์ด์šฉํ•ด ๋ฐ์ดํ„ฐ๋ฅผ ํŒŒ์‹ฑํ•˜๊ฑฐ๋‚˜ checksum ๊ณ„์‚ฐ์„ ์ˆ˜ํ–‰ํ•  ๋•Œ PTSD๊ฐ€ ์™”๋Š”๋ฐ, Python Struct๋Š” ์ •๋ง ์‹ ์„ธ๊ณ„์— ๊ฐ€๊นŒ์› ์Šต๋‹ˆ๋‹ค. ํŒŒ์ด์ฌ Struct๋Š” C์–ธ์–ด Struct์™€ ๋น„์Šทํ•ฉ๋‹ˆ๋‹ค. ์ž์„ธํ•œ ๋‚ด์šฉ์€ ๊ณต์‹๋ฌธ์„œ๋ฅผ ํ†ตํ•ด ์ฐธ๊ณ ํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. https://docs.python.org/3/library/struct.html struct — Interpret bytes as packed bina..
[ํŒŒ์ด์ฌ ํ”„๋กœ์ ํŠธ] Python CSV ์ด์–ด์„œ ์ €์žฅํ•˜๊ธฐ, header ๋ถ™์ด๊ธฐ
ยท
๐Ÿ Python/Project
์•ˆ๋…•ํ•˜์„ธ์š”. ์ œ๊ฐ€ ํ†ต์‹  ์ „๊ณต์œผ๋กœ ํ”„๋กœํ† ์ฝœ ๋“ฑ๋„ ์ค‘์š”ํ•˜์ง€๋งŒ ์ •ํ™•ํ•œ ์„ผ์„œ ๋ฐ์ดํ„ฐ ์ˆ˜์ง‘ํ•˜๋Š” ๊ฒƒ๋„ ๊ต‰์žฅํžˆ ์ค‘์š”ํ•˜๋‹ค๊ณ  ์š”์ฆ˜ ๋Š๋‚๋‹ˆ๋‹ค. ์ •ํ™•ํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ๋จธ์‹ ๋Ÿฌ๋‹, ๋”ฅ๋Ÿฌ๋‹, ํ•„ํ„ฐ๋ง์ด ๊ฐ€๋Šฅํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์ •ํ™•ํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ๋ชจ์œผ๋Š” ๊ฒƒ์€ ๊ฐ€์žฅ ์ค‘์š”ํ•ฉ๋‹ˆ๋‹ค. UART Serial ํ†ต์‹ (9600, 115200bps)์„ ํ†ตํ•ด ๊ฐ€์žฅ ์‹ฌํ”Œํ•œ CSVํ˜•์‹์ด ํ˜„์žฌ ๊ตฌ๊ธ€์—์„œ ๊ฐ€์žฅ ๋Œ๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๋งค๋ฒˆ ๋ฐ์ดํ„ฐ ์ˆ˜์ง‘์„ ์œ„ํ•ด ๋ฐ์ดํ„ฐ ์งœ๋Š” ๊ฒƒ์ด ๊ท€์ฐฎ๊ธฐ ๋•Œ๋ฌธ์— ์ €๋ฅผ ์œ„ํ•ด ๋ฉ”๋ชจ์žฅ ๋Š๋‚Œ์œผ๋กœ ์ฝ”๋”ฉ์„ ๊ธฐ๋กํ–ˆ์Šต๋‹ˆ๋‹ค. ํŒŒ์ด์ฌ ๊ณต์‹ ๋ฌธ์„œ๋ฅผ ๋ณด๋ฉด ์‰ฝ๊ฒŒ ์•Œ ์ˆ˜ ์žˆ์ง€๋งŒ, ๋ฒˆ์—ญ๊ธฐ์— ๋Œ๋ฆฐ ํ•œ๊ตญ๋ง์ด ์•ฝ๊ฐ„ ์ด์ƒํ•ฉ๋‹ˆ๋‹ค. https://docs.python.org/ko/3/library/csv.html csv — CSV ํŒŒ์ผ ์ฝ๊ธฐ์™€ ์“ฐ๊ธฐ — Python 3.9.7 ๋ฌธ์„œ ์†Œ..
์ฃผํ”ผํ„ฐ ๋…ธํŠธ๋ถ ํ…Œ๋งˆ ํˆด๋ฐ”(Toolbar) ๊ณ ์ • - ์ฃผํ”ผํ„ฐ ๋…ธํŠธ๋ถ ๊ฐœ์ธ ๋”ฅ๋Ÿฌ๋‹ ์„œ๋ฒ„ ๋งŒ๋“ค๊ธฐ ! (์˜ˆ์™ธํŽธ)
ยท
๐Ÿ Python/Deep Learning
์•ˆ๋…•ํ•˜์„ธ์š”. ์ „ ๊ธ€์€ ์ฃผํ”ผํ„ฐ ๋…ธํŠธ๋ถ์„ ์ด์šฉํ•˜์—ฌ ๋”ฅ๋Ÿฌ๋‹ ์„œ๋ฒ„๋ฅผ ๋งŒ๋“œ๋Š” ๊ธ€์„ ์˜ฌ๋ ธ์Šต๋‹ˆ๋‹ค. ๊ทธ ๊ณผ์ •์—์„œ ์ฃผํ”ผํ„ฐ ๋…ธํŠธ๋ถ์˜ ํ…Œ๋งˆ๋ฅผ ๋ณ€๊ฒฝํ•˜์˜€๊ณ , ํ™•์žฅ ํ”„๋กœ๊ทธ๋žจ์„ ์ด์šฉํ•˜์—ฌ ์ด๊ฒƒ์ €๊ฒƒ ํŒจํ‚ค์ง€๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ์ฃผํ”ผํ„ฐ ๋…ธํŠธ๋ถ ํ…Œ๋งˆ์˜ ํˆด๋ฐ”์™€ ํ™•์žฅ ํ”„๋กœ๊ทธ๋žจ์—์„œ Table of Contents์ด ๊ฒน์ณ์„œ ์˜ค๋ฅ˜๋Š” ์•„๋‹ˆ์ง€๋งŒ ์•„๋ž˜์˜ ์‚ฌ์ง„๊ณผ ๊ฐ™์ด ๋ฉ๋‹ˆ๋‹ค. ํˆด๋ฐ”์— ๊ฐ€๋ ค ์œ„ ๊ธ€์ด ๊ฐ€๋ ค ์ง‘๋‹ˆ๋‹ค. ์œ„ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด์„œ ์ฃผํ”ผํ„ฐ ๋…ธํŠธ๋ถ์˜ CSS๋ฅผ ๊ฑด๋“ค์—ฌ์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์–ด๋ ต์ง€ ์•Š์œผ๋‹ˆ ๊ทธ๋Œ€๋กœ ๋”ฐ๋ผํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. C:\Users\{"์‚ฌ์šฉ์ž ์ด๋ฆ„"}\.jupyter\custom ์ฃผํ”ผํ„ฐ ๋…ธํŠธ๋ถ ํ…Œ๋งˆ๋ฅผ ์„ค์น˜ํ–ˆ๋‹ค๋ฉด, .jupyter ๋””๋ ‰ํ† ๋ฆฌ์— custom ํด๋”๊ฐ€ ์ƒ์„ฑ๋˜์žˆ์Šต๋‹ˆ๋‹ค. custom ํด๋”์— custom.css๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. custom.css๋ฅผ ..
18์ง„์ˆ˜
'๐Ÿ Python' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก