eitcom / pyEIT

Python based toolkit for Electrical Impedance Tomography
Other
169 stars 96 forks source link

Image reconstruction not as expected | 16 electrode belt | opposition schema #98

Open NiklasTee opened 5 months ago

NiklasTee commented 5 months ago

First of all thanks for the project!

I collect real world data using a 16 electrode belt wrapped around the pelvic (bladder monitoring). Measurements are taken in opposition schema resulting in a DataFrame with 448 columns (224 for each Magnitude and Phase) like this:

E01_E09_E02_E10_Magnitude | E01_E09_E02_E10_Phase | E01_E09_E03_E11_Magnitude | E01_E09_E03_E11_Phase | -- | E16_E08_E14_E06_Magnitude | E16_E08_E14_E06_Phase | E16_E08_E15_E07_Magnitude | E16_E08_E15_E07_Phase

The electrodes are not spaced equally around the pelvic, but with vacancy above the pubic bone due to hardware design:

pyEIT_mesh

This is the code I am using for reconstruction:

config= {
    "n_el": 16,
    "h0": 0.07,
    "dist_exc": 8,
    "step_meas": 8,
    "parser_meas": "std",
    "inverse_solver": "JAC",
    "p": 0.5,
    "lamb": 0.01,
    "method": "kotre",
    "perm": 1,
    "jac_normalized": True,
    "normalize": True
}

mesh_obj = mesh.create(n_el=config['n_el'], h0=config['h0'], fd=mesh.shape.thorax)
mesh_obj.el_pos = np.array([517, 478, 5, 302, 219, 110, 42, 17, 15, 40, 109, 274, 11, 455, 515, 528])  # Custom arrangement
protocol_obj = protocol.create(config['n_el'], dist_exc=config['dist_exc'], step_meas=config['step_meas'], parser_meas=config['parser_meas'])

eit_solver = JAC(mesh_obj, protocol_obj)
eit_solver.setup(
    p=config['p'],
    lamb=config['lamb'],
    method=config['method'],
    perm=config['perm'],
    jac_normalized=config['jac_normalized']
    )

ds = 224.0 * eit_solver.solve(v0, v1, normalize=config['normalize'])  # v0, v1 contain the complex representation

Reconstruction runs through, but the results are not as expected. Even when validating the hardware on an agar-agar phantom, I found the algorithm struggling with the electrode position (results are better when assuming a equally spaced electrode arrangement, but still not as expected):

issue

Am I missing something, or is the combination of opposition schema with custom electrode arrangement just not suitable?

liubenyuan commented 4 months ago

Hi, concerning 16 electrodes with 224 measurements, I see that your protocol is step=8 and meas=8, which means that current carrying electrodes are also been used for measurements, right?

May be you could try step=8 (opposition excitation) meas=1 (adjacent measures), and drop the measures on current carrying electrodes. 16 electrodes will yield 192 total measurements, which might be stable in this setting.

NiklasTee commented 4 months ago

From my understanding, in step=8 and meas=8 the current carrying electrodes are not used for voltage measurement in the same set:

Current Emitting | Current Absorbing | Voltage Positive | Voltage Negative E01_E09_E02_E10 E01_E09_E03_E11 E01_E09_E04_E12 E01_E09_E05_E13 E01_E09_E06_E14 E01_E09_E07_E15 E01_E09_E08_E16 E01_E09_E10_E02 E01_E09_E11_E03 E01_E09_E12_E04 E01_E09_E13_E05 E01_E09_E14_E06 E01_E09_E15_E07 E01_E09_E16_E08

this repeats for the other 15 electrode pairs:

E02_E10_E01_E09 E02_E10_E03_E11 E02_E10_E04_E12 E02_E10_E05_E13 E02_E10_E06_E14 ...

I don't see a way to manipulate the collected data to arrive at a different configuration by dropping measures. Also, I am unable to rerun the experiment. Is there a reason why 224 measurements tends to be unstable?