Skip to content

Commit

Permalink
Merge pull request #1008 from anarkiwi/rotaten
Browse files Browse the repository at this point in the history
implement image inference rotation and log/send 1/n images.
  • Loading branch information
anarkiwi authored Dec 1, 2023
2 parents c192d21 + 0114015 commit bfd24b1
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libvulkan-dev \
python3-numpy
WORKDIR /root
RUN git clone https://github.com/iqtlabs/gr-iqtlabs -b 1.0.55
RUN git clone https://github.com/iqtlabs/gr-iqtlabs -b 1.0.56
COPY --from=iqtlabs/gamutrf-vkfft:latest /root /root/gr-iqtlabs
WORKDIR /root/gr-iqtlabs/build
COPY --from=sigmf-builder /usr/local /usr/local
Expand Down
2 changes: 1 addition & 1 deletion docs/README-airt.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ install gr-iqtlabs
$ git clone https://github.com/google/flatbuffers -b v23.5.26
$ git clone https://github.com/nlohmann/json -b v3.11.2
$ git clone https://github.com/deepsig/libsigmf -b v1.0.2
$ git clone https://github.com/iqtlabs/gr-iqtlabs -b 1.0.53
$ git clone https://github.com/iqtlabs/gr-iqtlabs -b 1.0.56
$ mkdir -p flatbuffers/build && cd flatbuffers/build && cmake -DCMAKE_INSTALL_PREFIX=~/.conda/envs/$CONDA_DEFAULT_ENV .. && make -j $(nproc) && make install && cd ../..
$ mkdir -p json/build && cd json/build && cmake -DCMAKE_INSTALL_PREFIX=~/.conda/envs/$CONDA_DEFAULT_ENV .. && make -j $(nproc) && make install && cd ../..
$ mkdir -p libsigmf/build && cd libsigmf/build && cmake -DUSE_SYSTEM_JSON=ON -DUSE_SYSTEM_FLATBUFFERS=ON -DCMAKE_INSTALL_PREFIX=~/.conda/envs/$CONDA_DEFAULT_ENV -DCMAKE_CXX_FLAGS="-I $HOME/.conda/envs/$CONDA_DEFAULT_ENV/include" .. && make -j $(nproc) && make install && cd ../..
Expand Down
5 changes: 5 additions & 0 deletions gamutrf/grscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def __init__(
logport=8001,
low_power_hold_down=False,
mqtt_server="",
n_image=0,
n_inference=0,
nfft=1024,
pretune=False,
rotate_secs=0,
Expand Down Expand Up @@ -219,6 +221,9 @@ def __init__(
model_name=inference_model_name,
confidence=inference_min_confidence,
max_rows=tune_step_fft,
rotate_secs=rotate_secs,
n_image=n_image,
n_inference=n_inference,
)
]
)
Expand Down
14 changes: 14 additions & 0 deletions gamutrf/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,20 @@ def argument_parser():
default=True,
action=BooleanOptionalAction,
)
parser.add_argument(
"--n_image",
dest="n_image",
type=int,
default=0,
help="if > 1, only log 1/n images",
)
parser.add_argument(
"--n_inference",
dest="n_inference",
type=int,
default=0,
help="if > 1, only send 1/n images for inference",
)
return parser


Expand Down

0 comments on commit bfd24b1

Please sign in to comment.