'프로그램 사용'에 해당되는 글 2386건

  1. 2025.09.25 gnuraduio wx gui deprecated
  2. 2025.09.25 qr-lora tutorial
  3. 2025.09.24 rtlsdr + gnuradio + lora 일단.. 실패
  4. 2025.09.22 osmo sdr
  5. 2025.09.21 gnuradio lora
  6. 2025.09.21 GstPipelineStudio on odroidc2
  7. 2025.09.20 GstPipelineStudio install on armbian
  8. 2025.09.20 GstPipelineStudio install 실패
  9. 2025.09.19 iperf3 affinity
  10. 2025.09.17 keras - transfer learning / fine tuning
프로그램 사용/rtl-sdr2025. 9. 25. 10:27

gnu radio 3.10 / ubuntu 22.04 사용중인데

wx gui  라는게 안보여서 찾아보니 3.8 오면서 사라졌다고 한다.

대신 qt로 대체 된다고.

 

From 3.7 to 3.8

When a flowgraph which has been generated by version 3.7 is opened in GRC version 3.8, much of the conversion process is done automatically. However, there are certain things which must be updated by hand.
  • WX GUI blocks: Since the WX GUI blocks are deprecated in version 3.8, the user must find corresponding blocks in the QT GUIs.
  • If blocks have different names between versions 3.7 and 3.8, they must be replaced by hand.

[링크 : https://wiki.gnuradio.org/index.php/Porting_Existing_Flowgraphs_to_a_Newer_Version]

[링크 : https://stackoverflow.com/questions/61355913/wx-gui-fft-sink-missing-in-gnc-for-windows]

'프로그램 사용 > rtl-sdr' 카테고리의 다른 글

wifi sdr - openwifi, antsdr 등등  (0) 2025.09.26
gr-lora with gnuradio 성공!  (0) 2025.09.25
qr-lora tutorial  (0) 2025.09.25
rtlsdr + gnuradio + lora 일단.. 실패  (0) 2025.09.24
osmo sdr  (0) 2025.09.22
Posted by 구차니
프로그램 사용/rtl-sdr2025. 9. 25. 00:13

offset을 측정해줘야 하는 듯. 비싼거 쓰면 안해줘도 된다고 하는데 드럽게 비싼녀석들이라 문제  -_-

udp를 통해 wireshark로 날릴수 있음

그나저나 bandwidth는 왜 도움말에는 없는것일까.

 

options에 grlora_rtlsdr 이 WX GUI를 생성하도록 한 것 같은데

 

어느정도 보정은 해주지만 센터에 맞출수 있도록 offset 변수를 추가해서

중심주파수를 잡도록 보정해주어야 하는 듯.

 

[링크 : https://github.com/rpp0/gr-lora/wiki/Capturing-LoRa-signals-using-an-RTL-SDR-device]

'프로그램 사용 > rtl-sdr' 카테고리의 다른 글

gr-lora with gnuradio 성공!  (0) 2025.09.25
gnuraduio wx gui deprecated  (0) 2025.09.25
rtlsdr + gnuradio + lora 일단.. 실패  (0) 2025.09.24
osmo sdr  (0) 2025.09.22
gnuradio lora  (0) 2025.09.21
Posted by 구차니
프로그램 사용/rtl-sdr2025. 9. 24. 11:01

아래에서 받아서 빌드하고 설치하고 

[링크 : https://github.com/rpp0/gr-lora]

 

gqrx로 일단 주파수를 보는데 잘 나오는것 확인

 

 

몇번의 고생(?) 끝에

설정을 맞춰보려고 했는데 파형은 가끔 보이는데 데이터로 파싱까진 가지 못한다.

 

너무 짧게 지나가서 동영상으로 촬영한 파형. 오른쪽이 신호가 잡힌 것

'프로그램 사용 > rtl-sdr' 카테고리의 다른 글

gnuraduio wx gui deprecated  (0) 2025.09.25
qr-lora tutorial  (0) 2025.09.25
osmo sdr  (0) 2025.09.22
gnuradio lora  (0) 2025.09.21
hackrf portapack (portable)  (0) 2025.09.11
Posted by 구차니
프로그램 사용/rtl-sdr2025. 9. 22. 23:35

예전에 본거 같은데 이제야 해보네

$ apt-cache search osmosdr
gr-osmosdr - Gnuradio blocks from the OsmoSDR project
libgnuradio-osmosdr0.2.0t64 - Gnuradio blocks from the OsmoSDR project - library
libosmosdr-dev - Software defined radio support for OsmoSDR hardware (development files)
libosmosdr0 - Software defined radio support for OsmoSDR hardware (library)
osmo-sdr - Software defined radio support for OsmoSDR hardware (tools)
soapyosmo-common0.8 - Use gr-osmosdr drivers with SoapySDR (common files)
soapysdr-module-osmosdr - OsmoSDR device support for SoapySDR (default version)
soapysdr0.8-module-osmosdr - OsmoSDR device support for SoapySDR

 

[링크 : https://osmocom.org/projects/osmosdr/wiki/OsmoSDR]

[링크 : https://osmocom.org/projects/osmosdr/wiki/Hardware]

 

원래는 osmosdr 이라는 장치를 위한 녀석이었는데

trl2832u 기반의 sdr도 지원한다고. librtlsdr 이라는 패키지도 있나보다?

gr-osmosdr - generic gnuradio SDR I/O block
While originally being developed for the OsmoSDR hardware, this block has become a generic SDR I/O block for a variety of SDR hardware, including:

FUNcube Dongle / Pro+ through gr-funcube
RTL2832U based DVB-T dongles through librtlsdr
RTL-TCP spectrum server (see librtlsdr project)
MSi2500 based DVB-T dongles through libmirisdr
SDRplay RSP through SDRplay API library
gnuradio .cfile input through libgnuradio-blocks
RFSPACE SDR-IQ, SDR-IP, NetSDR (incl. X2 option), Cloud-IQ, and CloudSDR
AirSpy Wideband Receiver through libairspy
CCCamp 2015 rad1o Badge through libhackrf
Great Scott Gadgets HackRF through libhackrf
Nuand LLC bladeRF through libbladeRF library
Ettus USRP Devices through Ettus UHD library
Fairwaves UmTRX through Fairwaves' module for UHD
Fairwaves XTRX through libxtrx
Red Pitaya SDR transceiver http://bazaar.redpitaya.com
FreeSRP through libfreesrp
By using the gr-osmosdr block you can take advantage of a common software API in your application(s) independent of the underlying radio hardware.

[링크 : https://github.com/osmocom/gr-osmosdr]

 

그러면 빌드 안해도 이걸로 쓸 수 있는건가?

$ apt-cache search librtlsdr
librtlsdr-dev - Software defined radio receiver for Realtek RTL2832U (development)
librtlsdr2 - Software defined radio receiver for Realtek RTL2832U (library)

 

+

2025.09.24

ubuntu 22.04 에 librtlsdr0 를 설치해서 정상적으로 gqrx 작동하는 것 확인함

'프로그램 사용 > rtl-sdr' 카테고리의 다른 글

qr-lora tutorial  (0) 2025.09.25
rtlsdr + gnuradio + lora 일단.. 실패  (0) 2025.09.24
gnuradio lora  (0) 2025.09.21
hackrf portapack (portable)  (0) 2025.09.11
gnuradio LoRa  (0) 2025.09.11
Posted by 구차니
프로그램 사용/rtl-sdr2025. 9. 21. 23:59

설치하려니까 아래 패키지들이 필요했다.

$ sudo apt-get install gnuradio-dev libliquid-dev liblog4cpp5-dev

 

-----

상세로그

$ cmake ../
-- The CXX compiler identification is GNU 13.3.0
-- The C compiler identification is GNU 13.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Build type not specified: defaulting to release.
CMake Error at CMakeLists.txt:87 (find_package):
  By not providing "FindGnuradio.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Gnuradio",
  but CMake did not find one.

  Could not find a package configuration file provided by "Gnuradio"
  (requested version 3.9) with any of the following names:

    GnuradioConfig.cmake
    gnuradio-config.cmake

  Add the installation prefix of "Gnuradio" to CMAKE_PREFIX_PATH or set
  "Gnuradio_DIR" to a directory containing one of the above files.  If
  "Gnuradio" provides a separate development package or SDK, be sure it has
  been installed.

 

$ sudo apt-get install gnuradio-dev

 

[ 30%] Building CXX object lib/CMakeFiles/gnuradio-lora.dir/message_socket_sink_impl.cc.o
/home/minimonk/src/gr-lora/lib/decoder_impl.cc:28:10: fatal error: liquid/liquid.h: No such file or directory
   28 | #include <liquid/liquid.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [lib/CMakeFiles/gnuradio-lora.dir/build.make:76: lib/CMakeFiles/gnuradio-lora.dir/decoder_impl.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:234: lib/CMakeFiles/gnuradio-lora.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

 

$ apt-cache search liquid
libliquid-dev - signal processing library for software defined radio (development files)
libliquid1 - signal processing library for software defined radio
liquidctl - CLI and Python drivers for AIO liquid coolers and other devices
liquidprompt - adaptative prompt for bash & zsh
liquidsoap - audio streaming language
liquidsoap-doc - Documentation for Liquidsoap
liquidsoap-mode - Emacs mode for editing Liquidsoap code
liquidwar - truly original multiplayer wargame
liquidwar-data - data files for Liquid War
liquidwar-server - Liquid War server
ruby-jekyll-gist - Liquid tag for displaying GitHub Gists in Jekyll sites
ruby-jekyll-include-cache - Jekyll plugin to cache the rendering of Liquid includes
ruby-liquid - Ruby library for rendering safe HTML and email templates
ruby-liquid-c - liquid performance extension in C

 

[ 45%] Linking CXX shared library libgnuradio-lora.so
/usr/bin/ld: cannot find -llog4cpp: No such file or directory
collect2: error: ld returned 1 exit status
make[2]: *** [lib/CMakeFiles/gnuradio-lora.dir/build.make:205: lib/libgnuradio-lora.so.1.0.0.0] Error 1
make[1]: *** [CMakeFiles/Makefile2:234: lib/CMakeFiles/gnuradio-lora.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

 

$ apt-cache search log4cpp
liblog4cpp-doc - C++ library for flexible logging (documentation)
liblog4cpp5-dev - C++ library for flexible logging (development)
liblog4cpp5v5 - C++ library for flexible logging (runtime)

 

$ sudo apt-get install liblog4cpp5-dev

 

+

2025.09.22

gr-lora

s$ ./lora_receive_file_nogui.py
[?] Download test LoRa signal to decode? [y/N] y
[+] Downloading https://research.edm.uhasselt.be/probyns/lora/usrp-868.1-sf7-cr4-bw125-crc-0.sigmf-data -> ./example-trace.sigmf-data
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
[+] Downloading https://research.edm.uhasselt.be/probyns/lora/usrp-868.1-sf7-cr4-bw125-crc-0.sigmf-meta -> ./example-trace.sigmf-meta
.
.
[+] Configuration: 868.1 MHz, SF 7, CR 4/8, BW 125 kHz, prlen 8, crc on, implicit off
[+] Decoding. You should see a header, followed by 'deadbeef' and a CRC 5 times.
Bits (nominal) per symbol:      3.5
Bins per symbol:        128
Samples per symbol:     1024
Decimation:             8
vmcircbuf_prefs::get :info: /home/minimonk/.gnuradio/prefs/vmcircbuf_default_factory failed to open: bad true, fail true, eof true
 04 90 40 de ad be ef 70 0d (p)
 04 90 40 de ad be ef 70 0d (p)
 04 90 40 de ad be ef 70 0d (p)
 04 90 40 de ad be ef 70 0d (p)
 04 90 40 de ad be ef 70 0d (p)
[+] Done

 

실행실패

<<< Welcome to GNU Radio Companion 3.10.9.2 >>>

Block paths:
/usr/share/gnuradio/grc/blocks
/usr/local/share/gnuradio/grc/blocks

Loading: "/home/minimonk/src/gr-lora/apps/lora_receive_realtime.grc"
>>> Done

Generating: "/home/minimonk/src/gr-lora/apps/lora_receive_realtime.py"
>>> Warning: This flow graph contains a throttle block and another rate limiting block, e.g. a hardware source or sink. This is usually undesired. Consider removing the throttle block.
>>> Warning: The block 'blocks_throttle_0' is deprecated.

Executing: /usr/bin/python3 -u /home/minimonk/src/gr-lora/apps/lora_receive_realtime.py

qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
[INFO] [UHD] linux; GNU C++ version 13.2.0; Boost_108300; UHD_4.6.0.0+ds1-5.1ubuntu0.24.04.1
Traceback (most recent call last):
  File "/home/minimonk/src/gr-lora/apps/lora_receive_realtime.py", line 234, in <module>
    main()
  File "/home/minimonk/src/gr-lora/apps/lora_receive_realtime.py", line 212, in main
    tb = top_block_cls()
         ^^^^^^^^^^^^^^^
  File "/home/minimonk/src/gr-lora/apps/lora_receive_realtime.py", line 77, in __init__
    self.uhd_usrp_source_0 = uhd.usrp_source(
                             ^^^^^^^^^^^^^^^^
RuntimeError: LookupError: KeyError: No devices found for ----->
Empty Device Address

>>> Done (return code 1)

 

귀찮아서(!) wayland에서 x.org로 변경후 실행

[링크 : https://mokhwasomssi.tistory.com/427]

 

UHD :USRP source에서 RTL-SDR source로 바꾸고 일단 실행하니

먼가 그래프로 나오긴 한데.. LoRa가 없어서 지금은 머가 나오는진 모르겠다.

 

상단에 Variable 라고 된 것을

LoRa Receiver의 설정(?)에 변수로 연결해서 사용하는데

이전에 qt로 드래그 하는 식으로 하는걸 본거 같긴한디..

 

$ wget http://research.edm.uhasselt.be/~probyns/lora/gr-lora-samples.zip
$ unzip gr-lora-samples.zip

 

파일에서 하는걸로 해서 해보니 그래프에서 두번째 peak가 뜰때 데이터가 하나씩 나온다.

 

[링크 : https://github.com/rpp0/gr-lora]

[링크 : https://github.com/tapparelj/gr-lora_sdr]

 

'프로그램 사용 > rtl-sdr' 카테고리의 다른 글

rtlsdr + gnuradio + lora 일단.. 실패  (0) 2025.09.24
osmo sdr  (0) 2025.09.22
hackrf portapack (portable)  (0) 2025.09.11
gnuradio LoRa  (0) 2025.09.11
gnuradio dvb-t  (0) 2025.04.02
Posted by 구차니

odroid c2 / armbian 에서 빌드 성공, 실행 성공

 

실행하면 다음과 같이 나온다.

 

videotestsrc와 waylandsink 를 추가하는데

sink를 추가하니 오른쪽 끝에 스크롤 돌려서 나와서 추가딘지도 모르고 몇번을 눌렀으니 주의

 

src_0 와 sink_0 중에 골라서 드래그 하면 선으로 이어진다.

 

그리고 play 버튼을 누르면 하단에 videotestsrc가 실행되고 출력되는걸 확인할 수 있다.

 

우클릭하면 properties가 나오는데

 

머 이것저것 나오긴한다.

 

waylandsink로 프로퍼티를 보면

 

먼가 잔뜩 나오긴 한다. 머.. 이거야 capfilter를 통해서 설정해야 하는데, 참조하긴 충분하려나?

 

저장하고 파일을 열어보니 xml로 그래프 로 저장된다.

$ cat test 
<?xml version="1.0" encoding="utf-8"?>
<Graph id="0">
  <Node name="videotestsrc" id="1" type="Source" pos_x="41.492188" pos_y="111.921875">
    <Port name="src_0" id="1" direction="Output" presence="Always">
      <Property name="_caps" value="video/x-raw, format=(string){ A444_16LE, A444_16BE, AYUV64, RGBA64_LE, ARGB64, ARGB64_LE, BGRA64_LE, ABGR64_LE, RGBA64_BE, ARGB64_BE, BGRA64_BE, ABGR64_BE, A422_16LE, A422_16BE, A420_16LE, A420_16BE, A444_12LE, GBRA_12LE, A444_12BE, GBRA_12BE, Y412_LE, Y412_BE, A422_12LE, A422_12BE, A420_12LE, A420_12BE, A444_10LE, GBRA_10LE, A444_10BE, GBRA_10BE, A422_10LE, A422_10BE, A420_10LE, A420_10BE, BGR10A2_LE, RGB10A2_LE, Y410, A444, GBRA, AYUV, VUYA, RGBA, RBGA, ARGB, BGRA, ABGR, A422, A420, AV12, Y444_16LE, GBR_16LE, Y444_16BE, GBR_16BE, v216, P016_LE, P016_BE, Y444_12LE, GBR_12LE, Y444_12BE, GBR_12BE, I422_12LE, I422_12BE, Y212_LE, Y212_BE, I420_12LE, I420_12BE, P012_LE, P012_BE, Y444_10LE, GBR_10LE, Y444_10BE, GBR_10BE, r210, I422_10LE, I422_10BE, NV16_10LE32, Y210, UYVP, v210, I420_10LE, I420_10BE, P010_10LE, NV12_10LE40, NV12_10LE32, P010_10BE, MT2110R, MT2110T, NV12_10BE_8L128, NV12_10LE40_4L4, Y444, BGRP, GBR, RGBP, NV24, v308, IYU2, RGBx, xRGB, BGRx, xBGR, RGB, BGR, Y42B, NV16, NV61, YUY2, YVYU, UYVY, VYUY, I420, YV12, NV12, NV21, NV12_16L32S, NV12_32L32, NV12_4L4, NV12_64Z32, NV12_8L128, Y41B, IYU1, YUV9, YVU9, BGR16, RGB16, BGR15, RGB15, RGB8P, GRAY16_LE, GRAY16_BE, GRAY10_LE32, GRAY8 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], multiview-mode=(string){ mono, left, right }; video/x-bayer, format=(string){ bggr, rggb, grbg, gbrg, bggr10le, rggb10le, grbg10le, gbrg10le, bggr10be, rggb10be, grbg10be, gbrg10be, bggr12le, rggb12le, grbg12le, gbrg12le, bggr12be, rggb12be, grbg12be, gbrg12be, bggr14le, rggb14le, grbg14le, gbrg14le, bggr14be, rggb14be, grbg14be, gbrg14be, bggr16le, rggb16le, grbg16le, gbrg16le, bggr16be, rggb16be, grbg16be, gbrg16be }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], multiview-mode=(string){ mono, left, right }" />
    </Port>
  </Node>
  <Node name="waylandsink" id="4" type="Sink" pos_x="360.66797" pos_y="109.390625">
    <Port name="sink_0" id="4" direction="Input" presence="Always">
      <Property name="_caps" value="video/x-raw, format=(string){ AYUV, RGBA, ARGB, BGRA, ABGR, P010_10LE, v308, RGBx, xRGB, BGRx, xBGR, RGB, BGR, Y42B, NV16, NV61, YUY2, YVYU, UYVY, I420, YV12, NV12, NV21, Y41B, YUV9, YVU9, BGR16, RGB16 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:DMABuf), format=(string)DMA_DRM, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]" />
    </Port>
  </Node>
  <Link id="2" node_from="1" node_to="4" port_from="1" port_to="4" active="true" />
</Graph>

'프로그램 사용 > gstreamer' 카테고리의 다른 글

gstreamer gstnavigation  (0) 2025.09.27
GstPipelineStudio install on armbian  (0) 2025.09.20
GstPipelineStudio install 실패  (0) 2025.09.20
gstpipelinestudio  (0) 2025.09.11
gstreamer 기초  (0) 2025.08.27
Posted by 구차니

그래도 24.04 라서 그런가 20.04 보단 수월하게 설치되네

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=24.04
DISTRIB_CODENAME=noble
DISTRIB_DESCRIPTION="Ubuntu 24.04 LTS"

 

다만 git readme에 써있는것 보다는 조금 많은 걸 추가로 설치해야 한다.

sudo apt install python3-pip ninja-build pkg-config meson cmake libgstreamer-plugins-bad1.0-dev
sudo apt install libgtk-4-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
sudo apt install appstream-util gettext

[링크 : https://stackoverflow.com/questions/9500898/compiler-error-msgfmt-command-not-found]

[링크 : https://github.com/patrickelectric/GstPipelineStudio]

'프로그램 사용 > gstreamer' 카테고리의 다른 글

gstreamer gstnavigation  (0) 2025.09.27
GstPipelineStudio on odroidc2  (0) 2025.09.21
GstPipelineStudio install 실패  (0) 2025.09.20
gstpipelinestudio  (0) 2025.09.11
gstreamer 기초  (0) 2025.08.27
Posted by 구차니

odroid c2 / ubuntu mate 20.04

 

적힌거랑은 다르게 libgtk-4가 없어서 libgtk-3로 깔았는데

libgtk-3-dev

apt install python3-pip ninja-build pkgconfig
pip3 install --user meson
apt install libgtk-4-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev

meson builddir -Dbuildtype=release
ninja -C builddir
./builddir/target/release/gst_pipeline_studio

 

2022년에 커밋된(가장 마지막으로) 녀석이라, 2020 년 버전으로는 무리인 듯.

commit 9e4e915b1d5c4603c312dcb007e0efbe137789af (HEAD -> main, origin/main, origin/HEAD)
Author: Stéphane Cerveau <scerveau@collabora.com>
Date:   Wed Feb 9 11:29:42 2022 +0100

    release: mention flathub for a new release

 

glibc가 낮으면 포기하는데 편하지

$ meson builddir -Dbuildtype=release

The Meson build system
Version: 1.9.0
Source dir: /home/odroid/GstPipelineStudio
Build dir: /home/odroid/GstPipelineStudio/builddir
Build type: native build
WARNING: Failed to load Cargo.lock: Could not find an implementation of tomllib, nor toml2json
Project name: gst_pipeline_studio
Project version: 0.2.3
Host machine cpu family: aarch64
Host machine cpu: aarch64
Program python3 found: YES (/usr/bin/python3)
WARNING: You should add the boolean check kwarg to the run_command call.
         It currently defaults to false,
         but it will default to true in meson 2.0.
         See also: https://github.com/mesonbuild/meson/issues/9300
Found pkg-config: YES (/usr/bin/pkg-config) 0.29.1
Dependency glib-2.0 found: NO. Found 2.64.6 but need: '>= 2.66'
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency glib-2.0 found: NO 

meson.build:13:0: ERROR: Dependency lookup for glib-2.0 with method 'pkgconfig' failed: Invalid version, need 'glib-2.0' ['>= 2.66'] found '2.64.6'.

A full log can be found at /home/odroid/GstPipelineStudio/builddir/meson-logs/meson-log.txt
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.

 

[링크  : https://github.com/patrickelectric/GstPipelineStudio]

'프로그램 사용 > gstreamer' 카테고리의 다른 글

GstPipelineStudio on odroidc2  (0) 2025.09.21
GstPipelineStudio install on armbian  (0) 2025.09.20
gstpipelinestudio  (0) 2025.09.11
gstreamer 기초  (0) 2025.08.27
gstreamer pipeline  (0) 2025.08.22
Posted by 구차니
프로그램 사용/iperf2025. 9. 19. 15:46

-A 3 하면 cpu3 에서만 function call interrupts가 많이 올라가고

-A 3-4 나 -A 3/4는 3에서만 올라간다. 정상적으로 구현이 안된건가?

 

$ cat /proc/interrupts 
            CPU0       CPU1       CPU2       CPU3       CPU4       CPU5       CPU6       CPU7       
 CAL:    5824227    4254156    5919589    3149051    2891279    2950553    2439272    2860177   Function call interrupts
$ man iperf3
       -A, --affinity n/n,m
              Set the CPU affinity, if possible (Linux, FreeBSD, and Windows only).  On both the  client
              and server you can set the local affinity by using the n form of this argument (where n is
              a CPU number).  In addition, on the client side you can override the server's affinity for
              just  that one test, using the n,m form of argument.  Note that when using this feature, a
              process will only be bound to a single CPU (as opposed to a set containing potentialy mul‐
              tiple CPUs).

 

$ iperf3 --help
Usage: iperf3 [-s|-c host] [options]
       iperf3 [-h|--help] [-v|--version]

Server or Client:
  -p, --port      #         server port to listen on/connect to
  -f, --format   [kmgtKMGT] format to report: Kbits, Mbits, Gbits, Tbits
  -i, --interval  #         seconds between periodic throughput reports
  -F, --file name           xmit/recv the specified file
  -A, --affinity n/n,m      set CPU affinity
  -B, --bind      <host>    bind to the interface associated with the address <host>
  -V, --verbose             more detailed output
  -J, --json                output in JSON format
  --logfile f               send output to a log file
  --forceflush              force flushing output at every interval
  --timestamps    <format>  emit a timestamp at the start of each output line
                            (using optional format string as per strftime(3))
  -d, --debug               emit debugging output
  -v, --version             show version information and quit
  -h, --help                show this message and quit
Server specific:
  -s, --server              run in server mode
  -D, --daemon              run the server as a daemon
  -I, --pidfile file        write PID file
  -1, --one-off             handle one client connection then exit
  --server-bitrate-limit #[KMG][/#]   server's total bit rate limit (default 0 = no limit)
                            (optional slash and number of secs interval for averaging
                            total data rate.  Default is 5 seconds)
  --rsa-private-key-path    path to the RSA private key used to decrypt
                            authentication credentials
  --authorized-users-path   path to the configuration file containing user
                            credentials
Client specific:
  -c, --client    <host>    run in client mode, connecting to <host>
  --sctp                    use SCTP rather than TCP
  -X, --xbind <name>        bind SCTP association to links
  --nstreams      #         number of SCTP streams
  -u, --udp                 use UDP rather than TCP
  --connect-timeout #       timeout for control connection setup (ms)
  -b, --bitrate #[KMG][/#]  target bitrate in bits/sec (0 for unlimited)
                            (default 1 Mbit/sec for UDP, unlimited for TCP)
                            (optional slash and packet count for burst mode)
  --pacing-timer #[KMG]     set the timing for pacing, in microseconds (default 1000)
  --fq-rate #[KMG]          enable fair-queuing based socket pacing in
                            bits/sec (Linux only)
  -t, --time      #         time in seconds to transmit for (default 10 secs)
  -n, --bytes     #[KMG]    number of bytes to transmit (instead of -t)
  -k, --blockcount #[KMG]   number of blocks (packets) to transmit (instead of -t or -n)
  -l, --length    #[KMG]    length of buffer to read or write
                            (default 128 KB for TCP, dynamic or 1460 for UDP)
  --cport         <port>    bind to a specific client port (TCP and UDP, default: ephemeral port)
  -P, --parallel  #         number of parallel client streams to run
  -R, --reverse             run in reverse mode (server sends, client receives)
  --bidir                   run in bidirectional mode.
                            Client and server send and receive data.
  -w, --window    #[KMG]    set window size / socket buffer size
  -C, --congestion <algo>   set TCP congestion control algorithm (Linux and FreeBSD only)
  -M, --set-mss   #         set TCP/SCTP maximum segment size (MTU - 40 bytes)
  -N, --no-delay            set TCP/SCTP no delay, disabling Nagle's Algorithm
  -4, --version4            only use IPv4
  -6, --version6            only use IPv6
  -S, --tos N               set the IP type of service, 0-255.
                            The usual prefixes for octal and hex can be used,
                            i.e. 52, 064 and 0x34 all specify the same value.
  --dscp N or --dscp val    set the IP dscp value, either 0-63 or symbolic.
                            Numeric values can be specified in decimal,
                            octal and hex (see --tos above).
  -L, --flowlabel N         set the IPv6 flow label (only supported on Linux)
  -Z, --zerocopy            use a 'zero copy' method of sending data
  -O, --omit N              omit the first n seconds
  -T, --title str           prefix every output line with this string
  --extra-data str          data string to include in client and server JSON
  --get-server-output       get results from server
  --udp-counters-64bit      use 64-bit counters in UDP test packets
  --repeating-payload       use repeating pattern in payload, instead of
                            randomized payload (like in iperf2)
  --username                username for authentication
  --rsa-public-key-path     path to the RSA public key used to encrypt
                            authentication credentials

[KMG] indicates options that support a K/M/G suffix for kilo-, mega-, or giga-

iperf3 homepage at: https://software.es.net/iperf/
Report bugs to:     https://github.com/esnet/iperf

 

받거나 보내는 건 각각 1개의 프로세스에서만 하도록 되어있나 보다.

Set the CPU affinity for the sender (-A 2) or the sender, receiver (-A 2,3), where the core numbering starts at 0. This has the same effect as running numactl -C 4 iperf3.

iperf3 -c <dst-ip> -A 2,3 

[링크 : https://docs.nvidia.com/networking-ethernet-software/knowledge-base/Configuration-and-Usage/Monitoring/Throughput-Testing-and-Troubleshooting/]

'프로그램 사용 > iperf' 카테고리의 다른 글

iperf3 udp 속도 테스트 on rpi 4  (0) 2025.09.15
iperf3 jumbo packet?  (0) 2025.02.15
iperf 파일로 바로바로 떨궈서 tail로 보기  (0) 2025.02.10
iperf3  (0) 2023.07.28
iperf udp 테스트  (0) 2022.03.14
Posted by 구차니

tflite 에서 weight만 빼서 거기서 부터 학습 시키면 그게 fine tune / transfer learning(전이학습)이 되는건가?

The conversion from a TensorFlow SaveModel or tf.keras H5 model to .tflite is an irreversible process. Specifically, the original model topology is optimized during the compilation by the TFLite converter, which leads to some loss of information. Also, the original tf.keras model's loss and optimizer configurations are discarded, because those aren't required for inference.

However, the .tflite file still contains some information that can help you restore the original trained model. Most importantly, the weight values are available, although they might be quantized, which could lead to some loss in precision.

The code example below shows you how to read weight values from a .tflite file after it's created from a simple trained tf.keras.Model.



import numpy as np
import tensorflow as tf

# First, create and train a dummy model for demonstration purposes.
model = tf.keras.Sequential([
    tf.keras.layers.Dense(10, input_shape=[5], activation="relu"),
    tf.keras.layers.Dense(1, activation="sigmoid")])
model.compile(loss="binary_crossentropy", optimizer="sgd")

xs = np.ones([8, 5])
ys = np.zeros([8, 1])
model.fit(xs, ys, epochs=1)

# Convert it to a TFLite model file.
converter = tf.lite.TFLiteConverter.from_keras_model(model)
tflite_model = converter.convert()
open("converted.tflite", "wb").write(tflite_model)

# Use `tf.lite.Interpreter` to load the written .tflite back from the file system.
interpreter = tf.lite.Interpreter(model_path="converted.tflite")
all_tensor_details = interpreter.get_tensor_details()
interpreter.allocate_tensors()

for tensor_item in all_tensor_details:
  print("Weight %s:" % tensor_item["name"])
  print(interpreter.tensor(tensor_item["index"])())

[링크 : https://stackoverflow.com/questions/59559289/is-there-any-way-to-convert-a-tensorflow-lite-tflite-file-back-to-a-keras-fil]

 

읽어오든.. tf.keras.application.MobileNetV2 해서 만들던 weight의 유무를 제외하면 동일하게 불러오는건가 보다.

# Create the base model from the pre-trained model MobileNet V2
IMG_SHAPE = IMG_SIZE + (3,)
base_model = tf.keras.applications.MobileNetV2(input_shape=IMG_SHAPE,
                                               include_top=False,
                                               weights='imagenet')
#or load your own
#base_modeltf.saved_model.load("./pretrained_models/ssd_mobilenet_v2_320x320_coco17_tpu-8/saved_model")

[링크 : https://www.aranacorp.com/en/training-a-tensorflow2-model-with-keras/]

 

다시 찾아보니 keras쪽 표현으로

transfer-learning은 기존의 값을 변화시키지 않고 추가 레이어에 학습시키는 것 같고

The typical transfer-learning workflow
This leads us to how a typical transfer learning workflow can be implemented in Keras:

Instantiate a base model and load pre-trained weights into it.
Freeze all layers in the base model by setting trainable = False.
Create a new model on top of the output of one (or several) layers from the base model.
Train your new model on your new dataset.
Note that an alternative, more lightweight workflow could also be:

Instantiate a base model and load pre-trained weights into it.
Run your new dataset through it and record the output of one (or several) layers from the base model. This is called feature extraction.
Use that output as input data for a new, smaller model.


First, instantiate a base model with pre-trained weights.

base_model = keras.applications.Xception(
    weights='imagenet',  # Load weights pre-trained on ImageNet.
    input_shape=(150, 150, 3),
    include_top=False)  # Do not include the ImageNet classifier at the top.
Then, freeze the base model.

base_model.trainable = False


Create a new model on top.

inputs = keras.Input(shape=(150, 150, 3))
# We make sure that the base_model is running in inference mode here,
# by passing `training=False`. This is important for fine-tuning, as you will
# learn in a few paragraphs.
x = base_model(inputs, training=False)
# Convert features of shape `base_model.output_shape[1:]` to vectors
x = keras.layers.GlobalAveragePooling2D()(x)
# A Dense classifier with a single unit (binary classification)
outputs = keras.layers.Dense(1)(x)
model = keras.Model(inputsoutputs)
Train the model on new data.

model.compile(optimizer=keras.optimizers.Adam(),
              loss=keras.losses.BinaryCrossentropy(from_logits=True),
              metrics=[keras.metrics.BinaryAccuracy()])
model.fit(new_dataset, epochs=20, callbacks=..., validation_data=...)

 

fine tuning은 모델 자체의 가중치를 변경시킬수 있도록 해서, 천천히 학습 시키는 것 같다.

Fine-tuning
Once your model has converged on the new data, you can try to unfreeze all or part of the base model and retrain the whole model end-to-end with a very low learning rate.

This is an optional last step that can potentially give you incremental improvements. It could also potentially lead to quick overfitting – keep that in mind.

It is critical to only do this step after the model with frozen layers has been trained to convergence. If you mix randomly-initialized trainable layers with trainable layers that hold pre-trained features, the randomly-initialized layers will cause very large gradient updates during training, which will destroy your pre-trained features.

It's also critical to use a very low learning rate at this stage, because you are training a much larger model than in the first round of training, on a dataset that is typically very small. As a result, you are at risk of overfitting very quickly if you apply large weight updates. Here, you only want to readapt the pretrained weights in an incremental way.


This is how to implement fine-tuning of the whole base model:

# Unfreeze the base model
base_model.trainable = True

# It's important to recompile your model after you make any changes
# to the `trainable` attribute of any inner layer, so that your changes
# are take into account
model.compile(optimizer=keras.optimizers.Adam(1e-5),  # Very low learning rate
              loss=keras.losses.BinaryCrossentropy(from_logits=True),
              metrics=[keras.metrics.BinaryAccuracy()])

# Train end-to-end. Be careful to stop before you overfit!
model.fit(new_dataset, epochs=10, callbacks=..., validation_data=...)

[링크 : https://keras.io/guides/transfer_learning/]

 

 

+

[링크 : https://89douner.tistory.com/270] vgg16 기준 추가학습

 

SavedModel 형식과 비교하여 H5 파일에 포함되지 않은 두 가지가 있습니다.

model.add_loss() 및 model.add_metric()을 통해 추가된 외부 손실 및 메트릭은 저장되지 않습니다(SavedModel과 다름). 모델에 이러한 솔실 및 메트릭이 있고 훈련을 다시 시작하려면 모델을 로드한 후 이러한 손실을 다시 추가해야 합니다. 이는 self.add_loss() 및 self.add_metric()을 통해 레이어 내부에서 생성한 손실/메트릭에는 적용되지 않습니다. 이러한 손실 및 메트릭은 레이어가 로드되는 한 레이어의 call 메서드의 일부이기 때문에 계속 유지됩니다.
사용자 정의 레이어와 같은 사용자 정의 객체의 계산 그래프는 저장 파일에 포함되지 않습니다. 로드 시 Keras는 모델을 다시 구성하기 위해 이러한 객체의 Python 클래스/함수에 액세스해야 합니다. 사용자 정의 객체를 참고하세요.

[링크 : https://www.tensorflow.org/guide/keras/save_and_serialize?hl=ko]

'프로그램 사용 > yolo_tensorflow' 카테고리의 다른 글

keras ssd mobilenet  (0) 2025.09.16
mobilenet 학습시키기 with keras, tensorflow  (0) 2025.09.15
ssd mobilenet  (0) 2025.09.11
LLM 시각화  (0) 2025.09.06
모델 학습  (0) 2025.09.05
Posted by 구차니