Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about attack_pipeline.py #5

Open
fzpr opened this issue Dec 27, 2021 · 0 comments
Open

about attack_pipeline.py #5

fzpr opened this issue Dec 27, 2021 · 0 comments

Comments

@fzpr
Copy link

fzpr commented Dec 27, 2021

Hello Dr.mirsky.
I tried implement your code for creating injector and remover models.
I used world coord for 169 sample E.g :
filename | z | x | y
LIDC-IDRI-0003/1-001.dcm | -169.6239465 | -47.40284557 | -30.171209
LIDC-IDRI-0011/1-001.dcm | -67.08815205 | -72.97101044 | 49.02652606
LIDC-IDRI-0012/1-001.dcm | -196.1703197 | 92.33199711 | 0.471155965
LIDC-IDRI-0013/1-001.dcm | -124.4263249 | -36.51308198 | -65.21501284
LIDC-IDRI-0014/1-001.dcm | -135.9209832 | 59.49693039 | -6.696593702
for creating injector model.

After completing the generator training process, the D loss, acc and G loss reach :

[Epoch 199/200] [Batch 342/347] [D loss: 0.000427, acc: 100%] [G loss: 4.560094] time: 1 day, 4:55:22.522646
[Epoch 199/200] [Batch 343/347] [D loss: 0.000721, acc: 100%] [G loss: 4.883993] time: 1 day, 4:55:24.019246
[Epoch 199/200] [Batch 344/347] [D loss: 0.000610, acc: 100%] [G loss: 5.273649] time: 1 day, 4:55:25.515293
[Epoch 199/200] [Batch 345/347] [D loss: 0.001337, acc: 100%] [G loss: 4.006495] time: 1 day, 4:55:27.011006

When using the generator model to inject into a new scan by running the 3A_inject_evidence.py , after adding noise touch ups in the attack_pipeline.py

print("Adding noise touch-ups...")

In output i receive these runtime warnings :

Adding noise touch-ups...
/home/Desktop/final2/env/lib/python3.8/site-packages/numpy/core/_methods.py:233: RuntimeWarning: Degrees of freedom <= 0 for slice
  ret = _var(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/home/Desktop/final2/env/lib/python3.8/site-packages/numpy/core/_methods.py:194: RuntimeWarning: invalid value encountered in true_divide
  arrmean = um.true_divide(
/home/Desktop/final2/env/lib/python3.8/site-packages/numpy/core/_methods.py:226: RuntimeWarning: invalid value encountered in double_scalars
  ret = ret.dtype.type(ret / rcount)
/home/Desktop/final2/env/lib/python3.8/site-packages/numpy/core/fromnumeric.py:3372: RuntimeWarning: Mean of empty slice.
  return _methods._mean(a, axis=axis, dtype=dtype,
/home/Desktop/final2/env/lib/python3.8/site-packages/numpy/core/_methods.py:170: RuntimeWarning: invalid value encountered in double_scalars
  ret = ret.dtype.type(ret / rcount)
touch-ups complete

And as a result of the injection process, some saved scan looks like this:

123

For some scans, I don't receive the runtime warnings and the injection is applied to the saved scan.
Can you help me with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant