vilari-mickopf / mmwave-gesture-recognition

Basic Gesture Recognition Using mmWave Sensor - TI AWR1642
MIT License
115 stars 21 forks source link

Tensorflow version for the project #8

Closed gigwegbe closed 1 year ago

gigwegbe commented 1 year ago

Hello @vilari-mickopf, Thanks for the project; however, I've been having difficulty setting up the project. Can you specify the version of TensorFlow you used? Thanks

gigwegbe commented 1 year ago

Also I bumped into this issue:

Selecting baud rate 115200
Connecting to port '/dev/ttyACM4'
Selecting baud rate 921600
Init done.

--- mmWave console ---
Type 'help' for more information.
>> start
Loading model...Done.

Configuring mmWave:
Sending:  sensorStop
Received: 
Failed sending configuration
Configuring mmWave:
Sending:  sensorStop
Received: 
Failed sending configuration
Configuring mmWave:
Sending:  sensorStop
Received: 
Failed sending configuration
Configuring mmWave:
Sending:  sensorStop
Received: 
Failed sending configuration
Configuring mmWave:
Sending:  sensorStop
Received: 
Failed sending configuration
mmWave not configured.
Listener not started.
>> Traceback (most recent call last):
  File "/home/george/Documents/EI/mmwave-gesture-recognition/console.py", line 1113, in <module>
    plotting(plotter_queues)
  File "/home/george/Documents/EI/mmwave-gesture-recognition/console.py", line 1092, in plotting
    plotter = init_plotter(plotter_queues)
  File "/home/george/Documents/EI/mmwave-gesture-recognition/console.py", line 1063, in init_plotter
    plotter = Plotter(plotter_queues['info'])
  File "/home/george/Documents/EI/mmwave-gesture-recognition/mmwave/utils/plotter.py", line 30, in __init__
    self.__set_figure()
  File "/home/george/Documents/EI/mmwave-gesture-recognition/mmwave/utils/plotter.py", line 41, in __set_figure
    self.ax.grid(b=False)
  File "/home/george/anaconda3/envs/tensorflow/lib/python3.9/site-packages/matplotlib/axes/_base.py", line 3196, in grid
    self.xaxis.grid(visible, which=which, **kwargs)
  File "/home/george/anaconda3/envs/tensorflow/lib/python3.9/site-packages/matplotlib/axis.py", line 1655, in grid
    self.set_tick_params(which='major', **gridkw)
  File "/home/george/anaconda3/envs/tensorflow/lib/python3.9/site-packages/matplotlib/axis.py", line 927, in set_tick_params
    kwtrans = self._translate_tick_params(kwargs)
  File "/home/george/anaconda3/envs/tensorflow/lib/python3.9/site-packages/matplotlib/axis.py", line 1071, in _translate_tick_params
    raise ValueError(
ValueError: keyword grid_b is not recognized; valid keywords are ['size', 'width', 'color', 'tickdir', 'pad', 'labelsize', 'labelcolor', 'zorder', 'gridOn', 'tick1On', 'tick2On', 'label1On', 'label2On', 'length', 'direction', 'left', 'bottom', 'right', 'top', 'labelleft', 'labelbottom', 'labelright', 'labeltop', 'labelrotation', 'grid_agg_filter', 'grid_alpha', 'grid_animated', 'grid_antialiased', 'grid_clip_box', 'grid_clip_on', 'grid_clip_path', 'grid_color', 'grid_dash_capstyle', 'grid_dash_joinstyle', 'grid_dashes', 'grid_data', 'grid_drawstyle', 'grid_figure', 'grid_fillstyle', 'grid_gapcolor', 'grid_gid', 'grid_in_layout', 'grid_label', 'grid_linestyle', 'grid_linewidth', 'grid_marker', 'grid_markeredgecolor', 'grid_markeredgewidth', 'grid_markerfacecolor', 'grid_markerfacecoloralt', 'grid_markersize', 'grid_markevery', 'grid_mouseover', 'grid_path_effects', 'grid_picker', 'grid_pickradius', 'grid_rasterized', 'grid_sketch_params', 'grid_snap', 'grid_solid_capstyle', 'grid_solid_joinstyle', 'grid_transform', 'grid_url', 'grid_visible', 'grid_xdata', 'grid_ydata', 'grid_zorder', 'grid_aa', 'grid_c', 'grid_ds', 'grid_ls', 'grid_lw', 'grid_mec', 'grid_mew', 'grid_mfc', 'grid_mfcalt', 'grid_ms']
>> plot
vilari-mickopf commented 1 year ago

I've used several different tf versions and they all worked (from python 3.8 with tf 2.5 if i remember correctly, to python 3.10 with tf 2.12 now). What exact error you are getting for tf? Second issue seems to be related to matplotlib, can you give me output of pip freeze command from your virtenv/conda env?

vilari-mickopf commented 1 year ago

Also, your board is registered, but it's not receiving packets from pc, can you check if SOP jumpers are correctly positioned and that you are not in the flash mode.

gigwegbe commented 1 year ago

Here's the result from pip freeze:

apturl==0.5.2
astroid==2.3.3
asttokens==2.0.3
attrs==22.2.0
autopep8==2.0.2
bcrypt==3.1.7
beautifulsoup4==4.11.1
blinker==1.4
Brlapi==0.7.0
certifi==2019.11.28
chardet==3.0.4
charset-normalizer==2.0.12
Click==7.0
colorama==0.4.3
command-not-found==0.3
contourpy==1.0.7
cryptography==2.8
cupshelpers==1.0
cycler==0.11.0
dbus-python==1.2.16
defer==1.0.6
distlib==0.3.6
distro==1.8.0
distro-info===0.23ubuntu1
docker==6.0.1
docker-compose==1.29.2
dockerpty==0.4.1
docopt==0.6.2
docutils==0.16
duplicity==0.8.12.0
entrypoints==0.3
fasteners==0.14.1
filelock==3.9.0
fonttools==4.38.0
future==0.18.2
gdown==4.6.0
html5lib==1.0.1
httplib2==0.14.0
idna==2.8
importlib-resources==5.12.0
isort==4.3.4
jedi==0.15.2
jsonschema==3.2.0
kazam==1.5.6
keyring==18.0.1
kiwisolver==1.4.4
language-selector==0.1
launchpadlib==1.10.13
lazr.restfulclient==0.14.2
lazr.uri==1.0.3
lazy-object-proxy==1.4.3
lockfile==0.12.2
logilab-common==1.4.3
louis==3.12.0
lxml==4.5.0
macaroonbakery==1.3.1
Mako==1.1.0
Markdown==3.1.1
MarkupSafe==1.1.0
matplotlib==3.7.0
mccabe==0.6.1
monotonic==1.5
mypy==0.761
mypy-extensions==0.4.3
netifaces==0.10.4
numpy==1.24.2
oauthlib==3.1.0
olefile==0.46
packaging==20.3
pandas==1.5.3
paramiko==2.6.0
parso==0.5.2
pbr==5.11.1
pexpect==4.6.0
pgi==0.0.11.2
Pillow==7.0.0
pipenv==2023.2.4
platformdirs==2.6.2
protobuf==3.6.1
psutil==5.5.1
pycairo==1.16.2
pycodestyle==2.10.0
pycups==1.9.73
pyds==1.1.2
pygame==2.1.3
Pygments==2.3.1
PyGObject==3.36.0
PyJWT==1.7.1
pylint==2.4.4
pymacaroons==0.13.0
PyNaCl==1.3.0
pyparsing==2.4.6
pyRFC3339==1.1
pyrsistent==0.19.3
pyserial==3.4
PySocks==1.7.1
python-apt==2.0.0+ubuntu0.20.4.8
python-dateutil==2.8.2
python-dbusmock==0.19
python-debian===0.1.36ubuntu1
python-dotenv==0.21.1
pytz==2022.7.1
pyusb==1.2.1
pyxdg==0.26
PyYAML==5.3.1
reportlab==3.5.34
requests==2.26.0
requests-unixsocket==0.2.0
roman==2.0.0
screen-resolution-extra==0.0.0
SecretStorage==2.3.1
Send2Trash==1.5.0
simplejson==3.16.0
six==1.14.0
soupsieve==2.3.2.post1
stevedore==4.1.1
systemd-python==234
texttable==1.6.7
thonny==3.2.7
tomli==2.0.1
tqdm==4.64.1
typed-ast==1.4.1
typing-extensions==3.7.4.1
ubuntu-advantage-tools==27.10
ubuntu-drivers-common==0.0.0
ufw==0.36
unattended-upgrades==0.1
urllib3==1.26.14
usb==0.0.83.dev0
usb-creator==0.3.7
virtualenv==20.17.1
virtualenv-clone==0.5.7
virtualenvwrapper==4.8.4
wadllib==1.3.3
webencodings==0.5.1
websocket-client==0.59.0
wrapt==1.11.2
xkit==0.0.0
zipp==3.15.0

You're right about the jumpers, I have connected one jumper to SOP2. It is working well. Thanks.

>> start
Loading model...Done.

Configuring mmWave:
Sending:  sensorStop
Received: mmwDemo:/>
Failed sending configuration
Configuring mmWave:
Sending:  sensorStop
Received: Done

Sending:  flushCfg
Received: Done

Sending:  dfeDataOutputMode 1
Received: Done

Sending:  channelCfg 15 3 0
Received: Done

Sending:  adcCfg 2 1
Received: Done

Sending:  adcbufCfg -1 0 0 1 0
Received: Done

Sending:  profileCfg 0 77 7 7 200 0 0 20 1 384 2000 0 0 30
Received: Done

Sending:  chirpCfg 0 0 0 0 0 0 0 1
Received: Done

Sending:  chirpCfg 1 1 0 0 0 0 0 2
Received: Done

Sending:  frameCfg 0 1 16 0 100 1 0
Received: Done

Sending:  lowPower 0 1
Received: Done

Sending:  guiMonitor -1 1 0 0 0 0 0
Received: Done

Sending:  cfarCfg -1 0 0 8 4 4 0 8534
Received: Done

Sending:  cfarCfg -1 1 0 4 2 3 0 8534
Received: Done

Sending:  peakGrouping -1 1 0 0 1 511
Received: Done

Sending:  multiObjBeamForming -1 1 0.5
Received: Done

Sending:  clutterRemoval -1 1
Received: Done

Sending:  calibDcRangeSig -1 0 -5 8 256
Received: Done

Sending:  extendedMaxVelocity -1 0
Received: Done

Sending:  bpmCfg -1 0 0 1
Received: Done

Sending:  lvdsStreamCfg -1 0 0 0
Received: Done

Sending:  nearFieldCfg -1 0 0 0
Received: Done

Sending:  compRangeBiasAndRxChanPhase 0.0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
Received: Done

Sending:  measureRangeBiasAndRxChanPhase 0 1.5 0.2
Received: Done

Sending:  CQRxSatMonitor 0 3 19 127 0
Received: Done

Sending:  CQSigImgMonitor 0 127 6
Received: Done

Sending:  analogMonitor 1 1
Received: Done

Sending:  sensorStart
Received: Debug: Init Calibration Status = 0x7fe

=== Listening ===
Waiting for sync...
Sync received!
vilari-mickopf commented 1 year ago

Awesome, glad it works. I am rewriting the whole package, so in the future i will definitively print info if you've accidentally left flash mode on, because you are not the first one who had this issue.

gigwegbe commented 1 year ago

Any update on the version of matplotlib you used? Everything is working fine except the plotter.

vilari-mickopf commented 1 year ago

Hmm might be qt problem actually, because matplotlib is using qt backend. A have Qt 5.15.8 and matplotlib 3.7.1. Try installing qt if it's not installed already, or maybe you can try setting different backend in mmwave/utils/plotter.py on the line 15. You have available specs here: https://matplotlib.org/stable/users/explain/backends.html

gigwegbe commented 1 year ago

I replaced this line 41 with this self.ax.grid(), all working fine now. Thanks for the feedback.

Longbojunn commented 1 year ago

when I use 'start',this above will appear every time: Unknown profile. mmWave not configured. Listener not started. Plotter stopped. mmWave stopped.

dose it means I need to install mmWave demo visualizer before?

vilari-mickopf commented 1 year ago

Nope, all deps are listed in setup.py. It seems like there is an issue with your project path. Profiles are stored in mmwave/communication/profiles/, and console.py is accessing them by using relative location. Try modifing line 59 of console.py with this:

 self.config_dir = os.path.join(os.path.dirname(__file__), 'mmwave/communication/profiles')
Longbojunn commented 1 year ago

It works when I replace the line 59 of console.py with the code you give! Thanks for your useful help and timely reply sincerely!

vilari-mickopf commented 1 year ago

Yea, I will change that in new version, few people already had that issue. Feel free to open a separate issue for any problem that you have.