Thank you for the interest in eit_app
!
eit_app
is a python-based, open-source framework for Electrical Impedance Tomography (EIT) reconstruction.
Available https://github.com/DavidMetzIMT/eit_app
Packages | Optional | Note | Links |
---|---|---|---|
numpy | tested with numpy-1.21.2 |
||
dataclasses | tested with dataclasses-0.8 |
||
matplotlib | tested with matplotlib-3.3.2 |
||
PyQt5 | tested with PyQt5-5.15.6 |
||
pyserial | tested with pyserial-3.5 |
||
eit_model | tested with eit_model >> pyEIT , eit_ai |
eit_model, pyEIT, eit_ai | |
eit_ai | tested with eit_ai >> keras , pytorch |
eit_ai | |
glob_utils | tested with glob_utils |
glob_utils |
- Serial communication with
a Sciospec EIT32-device from the compagny Sciospec
- Setting/reading measurements setups of the
Sciospec EIT32-device
- Impedance Measurements aquisition (continious mode) with
Sciospec EIT32-device
- Saving of measurements
- Replay of saved measurements
- Liveview plots of measurements values
- Liveview plots of 2D reconstruction using
pyEIT
reconstruction algorithms:Gauss-Newton solver (JAC), Back-projection (BP), 2D GREIT - Liveview plots of 2D reconstruction using Neuronal Network
- Liveview plots of 3D reconstruction
- Liveview of chamber from usb camera and saving of image for measuremnets
- Complete electrode model (CEM) support (not in
pyEIT
implemented yet)
eit_app
is purely python based, it can be installed and run without any difficulty.
cd path/to/eit_app
python eit_app/main.py
When open the app at first time, some global directories will be asked.
The GUI has three columns. The left is measurement configurations. The middle column shows the image reconstruction and the voltage plots. The right column shows the camera figure and export configuration.
The first step is to choose the EIT model, by loading a mat-file. In this file the design of the chamber with the electrodes and the injection and measurement patterning are defined. Such file are “infos2py.mat”-file created by App_EIDORS_ModelSim
).
Thanks that file a model of the chamber can be defined with electrodes.
Notes:
- TODO save/load the Eit_model as json for less matalb depedencies
Actually only EIT-32 Device from Sciospec can be used using USB FB. diffrent actions ar here possible:
Refresh
, search for EIT-32 Device from Sciospec on Serial portsConnect
, connect device selectedDisconnect
, disconnect actual deviceGet Setup
, get the actual setups of the device (Injection pattern is maybe not correct!...)Set setup
, set the setup of the device using the passed settingsReset Setup
, reset the setup to factory/start-up settingsSave/Load Setup
, save/load the setup to/from json-file
For setting the setup please look the documentation of the sciospec device.
The Chip Type
defines the pairs the electrodes define the model and the channel of the device which ar connected together.
for example in the model presented below the electrode #1 define in the model is on the top. But on the snapshot the top electrode is connected to the channel #16. The Chip-type are defined by a txt-file containing those electrode/channel pairs:
1 16
2 15
3 14
4 13
5 12
6 11
...
You can add such a txt-file ind dir "chip_design" for adding new Type!
The “Excitation/injection Pattern” is displayed fro two point of views: which are related to this chip type:
- Model view shows the injection pattern with the #electrode commimg from the loaded EIT model
- and Chip view shows the corresponding injection pattern with the #channel as defined in the chip type.
Notes:
- extend App for other devices
- Attention: by loading measurements the chip has to be reselected...! (TODO save it with measurmenents)
After connecting and setting the device, measurmenets can be started/paused/resumed and stopped.
During the acquisition multiple actions are done:
- Saving actions:
- create a measurement-dataset directory under "measurements/" using the dataset-name passed by the user (datetime is added to avoid overwriting odler dataset)
- save the setup of the device
- each measurement-frame the measurement data are saved in single json-file
- If the camera has been connected and the capture started (before meas. start), a snapshot of each frame will be saved.
- Computing/ploting actions:
- display the metadate of the last frame in "Frame infos": Frequency, Amplitude, excitation etc
- compute/plot electrode voltages
- compute/plot eit data, which are used for the reconstruction, for the selected imaging configuration
- compute/plot the eit image if a reconstruction solver has been initilizated.
- If the camera has been connected and the capture started, the snapshot is diplayed.
The replay part allow to reload measurement dataset. This allow you to test/rerun other reconstruction/imaging settings, export data, ...
Selection of imaging configurations
By playing the replay or selecting another frame, same data will be computed/plot as during aquisition.
Notes:
- Attention: When replay the measurement, if the camera state is still measuring, the image will be overwritten.
For EIT image reconstruction two solvers are available (see eit_model):
Selection of imaging configurations
“Activate calibration” allows to calibrate the voltages. The reconstruction image and Voltage plots will be computed every frame.
Notes:
- Attention: When replay the measurement, if the camera state is still measuring, the image will be overwritten.
pyEIT reconstruction can run during the data acquisition.
This solver used a trained model corresponding to a specific, EIT-model(meshing). Such model can be trained using the package eit_ai
During AI reconstruction setting, the model path will be asked. Before loading the model, the EIT model should be selected correctly for that load the "*infos2py.mat" file from the training dataset.
EIT data used for the reconstruction are generated using an “Imaging” configuration:
- type : abasolute, time -, frequency difference
- part of the impedance: real, image, magnitude, phase
- ref, meas. frequency, ref. frame.
Set FEMrefinement before setting the reconstruction. Both pyEIT and Ai solver can be selected for EIT reconstruction. Any solver should select correspondant EIT model. pyEIT reconstruction can run during the data acquisition.
For showing the 3D view, “mode generation 2D” should be unclicked. Click “Open pyvista viewer” in Plot settings first, then adjust the parameters of pyEIT and set the solver.
In Replay mode (after loading a meas. dataset) it is possible to extract multiple data:
EIT image
, export the reconstruction imageEIT data
, export the reconstruction dataAnalysis protocol
, export the metadata about the dataset including measurement settings, EIT model, parameters of reconstruction solver- ...
Those data can be exported automatically loopwise for all frames, all meas. frequencies and all imaging types
Selection of export configurations
If you find eit_app
useful, please cite our work!