文档服务地址:http://47.92.0.57:3000/ 周报索引地址:http://47.92.0.57:3000/s/NruNXRYmV

Commit 5fee1f79 by 王肇一

Jaccard score

parent ca83308e
...@@ -17,7 +17,7 @@ import re ...@@ -17,7 +17,7 @@ import re
from unet import UNet from unet import UNet
from mrnet import MultiUnet from mrnet import MultiUnet
from utils.predict import predict_img from utils.predict import predict_img,predict
from resCalc import save_img, get_subarea_info, save_img_mask from resCalc import save_img, get_subarea_info, save_img_mask
...@@ -30,8 +30,8 @@ def step_1(net, args, device, list, position): ...@@ -30,8 +30,8 @@ def step_1(net, args, device, list, position):
for fn in tqdm(list, position = position): for fn in tqdm(list, position = position):
logging.info("\nPredicting image {} ...".format(fn[0] + '/' + fn[1])) logging.info("\nPredicting image {} ...".format(fn[0] + '/' + fn[1]))
img = Image.open('data/imgs/' + fn[0] + '/' + fn[1]) img = Image.open('data/imgs/' + fn[0] + '/' + fn[1])
mask = predict_img(net = net, full_img = img, out_threshold = args.mask_threshold, #mask = predict_img(net = net, full_img = img, out_threshold = args.mask_threshold, device = device)
device = device) mask = predict(net = net, full_img = img, out_threshold = args.mask_threshold, device = device)
result = (mask * 255).astype(np.uint8) result = (mask * 255).astype(np.uint8)
#save_img({'ori': img, 'mask': result}, fn[0], fn[1]) #save_img({'ori': img, 'mask': result}, fn[0], fn[1])
......
_background_
target
\ No newline at end of file
Step size0Dwell time50 Clinical Sample K. p Tobramycin 16ug 852nm 30mw 300mw tune 43.00 001 63
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 16ug 852nm 30mw 300mw tune 43.00 003 189
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 128ug 852nm 30mw 300mw tune 43.00 002 77
Step size0Dwell time50 K.p atcc 700603 12.16 Gentsmincin 8ug 40mw 400mw tune 43.08 003 162
Step size0Dwell time50 E.coil ATCC25922 PBb Tobramycin 0.5ug 852nm 30mw 300mw tune 43.02 002 176
Step size0Dwell time50 E.faecium atcc 29212 Amp 1ug 852nm 40mw 400mw tune 43.08 004 88
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 1ug 852nm 40mw 400mw tune 43.08 002 348
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 1ug 852nm 30mw 300mw tune 43.02 003 360
Step size0Dwell time50 E.coil D2O 852nm 30mw 300mw tune 43.02 004 406
Step size0Dwell time50 E.coil atcc 25922 12.16 D2O 852nm 40mw 400mw tune 43.08 001- 412
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 2ug 852nm 30mw 300mw tune 43.02 002 374
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 0.25ug 40mw 400mw tune 43.08 002 228
Step size0Dwell time50 P.a atcc27853 Gen 0.5ug 852nm 30mw 300mw tune 43.03 001 214
Step size0Dwell time50 S.a atcc 29213 1h d2o-2 852nm 40mw 400mw tune 43.08 003 200
Step size0Dwell time50 P.a atcc27853 LB-11.29 852nm 30mw 300mw tune 43.06 001 201
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 16ug 852nm 30mw 300mw tune 43.00 003 215
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.125ug 852nm 40mw 400mw tune 43.08 002 229
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.125ug 852nm 40mw 400mw tune 43.08 003 413
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 4ug 852nm 30mw 300mw tune 43.02 001 375
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 16ug 852nm 30mw 300mw tune 43.00 002 361
Step size0Dwell time50 S.a atcc 29213 1h d2o-2 852nm 40mw 400mw tune 43.08 002 407
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 0.25ug 40mw 400mw tune 43.08 003 349
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 2ug 852nm 30mw 300mw tune 43.02 003 177
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 2ug 852nm 40mw 400mw tune 43.08 002 89
Step size0Dwell time50 E.coil atcc 25922 12.12 TOB 0.25 852nm 40mw 400mw tune 43.11 003 163
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 32ug 40mw 400mw tune 43.08 004 188
Step size0Dwell time50 P.a atcc 27853 Ceft 4ug 852nm 30mw 300mw tune 43.03 001 76
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 1ug 852nm 40mw 400mw tune 43.08 003 62
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 1ug 852nm 30mw 300mw tune 43.02 002 74
Step size0Dwell time50 E.coil atcc25922 Amipicillin 8ug 852nm 40mw 400mw tune43.08 60x oil obj 002 60
Step size0Dwell time50 E.faecium atcc 29212 Amp 2ug 852nm 40mw 400mw tune 43.08 004 48
Step size0Dwell time50 K.p atcc 700603 12.16 Gentsmincin 8ug 40mw 400mw tune 43.08 002 149
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 32ug 40mw 400mw tune 43.08 004 175
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 128ug 852nm 30mw 300mw tune 43.00 003 161
Step size0Dwell time50 E.coil atcc25922 Gentamicin 1ug 852nm 30mw 300mw tune 43.04 004 388
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 16ug 852nm 30mw 300mw tune 43.00 002 439
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 128ug 852nm 30mw 300mw tune 43.00 001 377
Step size0Dwell time50 Clinical Sample K. p Tobramycin 16ug 852nm 30mw 300mw tune 43.00 002 411
Step size0Dwell time50 E.coil ATCC25922 PBb Tobramycin 0.5ug 852nm 30mw 300mw tune 43.02 001 405
Step size0Dwell time50 E.faecium atcc 29212 Ery 0.25ug 852nm 40mw 400mw tune 43.08 004 363
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 1ug 852nm 40mw 400mw tune 43.08 001 559
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 2ug 852nm 30mw 300mw tune 43.02 001 203
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 0.25ug 40mw 400mw tune 43.08 001 217
Step size0Dwell time50 E.faecium atcc 29212 Ampicillin D2O 852nm 40mw 400mw tune 43.08 005 216
Step size0Dwell time50 P.a atcc 27853 Ceft 2ug 852nm 30mw 300mw tune 43.03 001 202
Step size0Dwell time50 S.a atcc 29213 Eryth 0.03125ug 852nm 40mw 400mw tune 43.08 002 558
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.125ug 852nm 40mw 400mw tune 43.08 001 404
Step size0Dwell time50 E.coil atcc25922 Imipenen 0.5ug 852nm 40mw 400mw tune43.08 60x oil obj 002 362
Step size0Dwell time50 E.coil atcc25922 Imipenen 0.5ug 852nm 40mw 400mw tune43.08 60x oil obj 003 376
Step size0Dwell time50 P.a atcc 27853 Ceft 1ug 852nm 30mw 300mw tune 43.03 001 410
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 16ug 852nm 30mw 300mw tune 43.00 001 438
Step size0Dwell time50 S.a atcc 29213 Eryth 0.03125ug 852nm 40mw 400mw tune 43.08 003 389
Step size0Dwell time50 P.a overnight Tob 1ug 852nm 30mw 300mw tune 43.05 004 160
Step size0Dwell time50 S.a atcc 29213 1h d2o-2 852nm 40mw 400mw tune 43.08 001 174
Step size0Dwell time50 P.a atcc27853 D2O-11.29 852nm 30mw 300mw tune 43.06 002 148
Step size0Dwell time50 P.a atcc 27853 Ceft 4ug 852nm 30mw 300mw tune 43.03 002 49
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 1ug 852nm 30mw 300mw tune 43.02 001 61
Step size0Dwell time50 E.coil atcc25922 Imipenen 0.25ug 852nm 40mw 400mw tune43.08 60x oil obj 001 75
Step size0Dwell time50 E.coil atcc25922 Amipicillin 8ug 852nm 40mw 400mw tune43.08 60x oil obj 001 59
Step size0Dwell time50 K.p atcc 700603 12.16 Gentsmincin 8ug 40mw 400mw tune 43.08 001 71
Step size0Dwell time50 P.a atcc27853 Imipenen D2O 852nm 30mw 300mw tune 43.02 001 65
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 16ug 852nm 30mw 300mw tune 43.00 001 170
Step size0Dwell time50 Clinical Sample K. p Tobramycin 16ug 852nm 30mw 300mw tune 43.00 003 164
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 32ug 40mw 400mw tune 43.08 003 158
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 64ug 40mw 400mw tune 43.08 001-1 399
Step size0Dwell time50 E.faecium atcc 29212 Amp 2ug 852nm 40mw 400mw tune 43.08 003 414
Step size0Dwell time50 E.faecium atcc 29212 Ery 0.25ug 852nm 40mw 400mw tune 43.08 001 372
Step size0Dwell time50 E.faecium atcc 29212 Amp 1ug 852nm 40mw 400mw tune 43.08 002 366
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 32ug 40mw 400mw tune 43.08 003 400
Step size0Dwell time50 E.coil atcc 25922 12.12 TOB 0.25 852nm 40mw 400mw tune 43.11 004 428
Step size0Dwell time50 E.coil D2O 852nm 30mw 300mw tune 43.02 002 560
Step size0Dwell time50 E.coil atcc25922 Imipenen 0.25ug 852nm 40mw 400mw tune43.08 60x oil obj 011 206
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 1ug 852nm 40mw 400mw tune 43.08 004 212
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 2ug 852nm 30mw 300mw tune 43.02 004 548
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 0.25ug 40mw 400mw tune 43.08 004 549
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 2ug 852nm 40mw 400mw tune 43.08 005 213
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 16ug 40mw 400mw tune 43.08 001 561
Step size0Dwell time50 P.a overnight Tob 2ug 852nm 30mw 300mw tune 43.05 001 207
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.25ug 852nm 40mw 400mw tune 43.08 003 429
Step size0Dwell time50 S.a atcc 29213 1h d2o-2 852nm 40mw 400mw tune 43.08 004 367
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 16ug 852nm 30mw 300mw tune 43.00 004 401
Step size0Dwell time50 E.coil atcc25922 Amipicillin 16ug 852nm 40mw 400mw tune43.08 60x oil obj 001 415
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.0625ug 852nm 40mw 400mw tune 43.08 005 373
Step size0Dwell time50 E.coil atcc25922 Imipenen 0.25ug 852nm 40mw 400mw tune43.08 60x oil obj 004 398
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 1ug 852nm 30mw 300mw tune 43.02 004 159
Step size0Dwell time50 E.coil D2O 852nm 30mw 300mw tune 43.02 003 165
Step size0Dwell time50 E.faecium atcc 29212 Amp 1ug 852nm 40mw 400mw tune 43.08 003 171
Step size0Dwell time50 E.faecium atcc 29212 Amp 2ug 852nm 40mw 400mw tune 43.08 002 64
Step size0Dwell time50 E.coil ATCC25922 PBb Tobramycin 0.5ug 852nm 30mw 300mw tune 43.02 005 70
Step size0Dwell time50 K.p atcc700603 Imipenen 0.25ug 852nm 40mw 400mw tune43.08 002 58
Step size0Dwell time50 E.coil atcc25922 Gentamicin 2ug 852nm 30mw 300mw tune 43.04 003 8
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 16ug 852nm 30mw 300mw tune 43.00 004 198
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 32ug 40mw 400mw tune 43.08 002 66
Step size0Dwell time50 E.coil atcc25922 Gentamicin 1ug 852nm 30mw 300mw tune 43.04 002 72
Step size0Dwell time50 P.a atcc27853 Gen 4ug 852nm 30mw 300mw tune 43.03 002 167
Step size0Dwell time50 P.a overnight Tob 0.5ug 852nm 30mw 300mw tune 43.05 002 99
Step size0Dwell time50 Clinical Sample K. p Tobramycin 16ug 852nm 30mw 300mw tune 43.00 004 173
Step size0Dwell time50 E.faecium atcc 29212 Ery 0.25ug 852nm 40mw 400mw tune 43.08 002 403
Step size0Dwell time50 P.a atcc27853 Gen 2ug 852nm 30mw 300mw tune 43.03 002 365
Step size0Dwell time50 E.coil atcc25922 Amipicillin 8ug 852nm 40mw 400mw tune43.08 60x oil obj 006 371
Step size0Dwell time50 E.faecium atcc 29212 Amp 1ug 852nm 40mw 400mw tune 43.08 001 417
Step size0Dwell time50 E.coil D2O 852nm 30mw 300mw tune 43.02 001 359
Step size0Dwell time50 E.faecium atcc 29212 Ampicillin D2O 852nm 40mw 400mw tune 43.08 003 211
Step size0Dwell time50 E.coil atcc25922 Amipicillin 16ug 852nm 40mw 400mw tune43.08 60x oil obj 003 205
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 2ug 852nm 40mw 400mw tune 43.08 006 563
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 16ug 40mw 400mw tune 43.08 002 239
Step size0Dwell time50 P.a overnight Tob 2ug 852nm 30mw 300mw tune 43.05 002 238
Step size0Dwell time50 E.coil atcc25922 Imipenen 0.5ug 852nm 40mw 400mw tune43.08 60x oil obj 004 204
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.25ug 852nm 40mw 400mw tune 43.08 001 562
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 16ug 40mw 400mw tune 43.08 003 210
Step size0Dwell time50 E.faecium atcc 29212 Ampicillin D2O 852nm 40mw 400mw tune 43.08 002 358
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.0625ug 852nm 40mw 400mw tune 43.08 006 370
Step size0Dwell time50 P.a overnight Tob 4ug 852nm 30mw 300mw tune 43.05 001 416
Step size0Dwell time50 E.coil atcc 25922 12.12 TOB 0.25 852nm 40mw 400mw tune 43.11 006 402
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 32ug 40mw 400mw tune 43.08 001 364
Step size0Dwell time50 P.a atcc27853 Gen 1ug 852nm 30mw 300mw tune 43.03 002 172
Step size0Dwell time50 P.a overnight Tob 0.25ug 852nm 30mw 300mw tune 43.05 003 166
Step size0Dwell time50 E.faecium atcc 29212 Lb 852nm 40mw 400mw tune 43.08 0077 98
Step size0Dwell time50 E.faecium atcc 29212 Amp 2ug 852nm 40mw 400mw tune 43.08 001 73
Step size0Dwell time50 E.faecium atcc 29212 Ery 0.25ug 852nm 40mw 400mw tune 43.08 003 199
Step size0Dwell time50 K.p atcc700603 Imipenen 0.25ug 852nm 40mw 400mw tune43.08 001 67
Step size0Dwell time50 E.coil atcc25922 Gentamicin 1ug 852nm 30mw 300mw tune 43.04 001 9
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 32ug 40mw 400mw tune 43.08 001 14
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 256ug 852nm 30mw 300mw tune 43.00 004 28
Step size0Dwell time50 S.a atcc 29213 Linezolid 16ug 852nm 40mw 400mw tune 43.08 003 129
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 4ug 40mw 400mw tune 43.08 004 101
Step size0Dwell time50 P.a atcc27853 Amipicillin 16ug 852nm 30mw 300mw tune 43.03 001 115
Step size0Dwell time50 E.coil atcc 25922 12.16 D2O 852nm 40mw 400mw tune 43.08 001 459
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 0.125ug 852nm 40mw 400mw tune 43.08 006 465
Step size0Dwell time50 E.coil ATCC25922 PBb Tobramycin 0.25ug 852nm 30mw 300mw tune 43.02 004 303
Step size0Dwell time50 P.a 1h D2O 852nm 30mw 300mw tune 43.03 004 317
Step size0Dwell time50 E.coil atcc 25922 12.16 lb 852nm 40mw 400mw tune 43.08 002 471
Step size0Dwell time50 E.faecium atcc 29212 Amp 0.25ug 852nm 40mw 400mw tune 43.08 002 288
191128-Step size0Dwell time50 P.a overnight LB 852nm 30mw 300mw tune 43.05 001 539
Step size0Dwell time50 P.a atcc27853 Levofloxacin-11.29 0.5ug 852nm 30mw 300mw tune 43.06 003 511
Step size0Dwell time50 E.faecium atcc 29212 Ery 2ug 852nm 40mw 400mw tune 43.08 002 277
Step size0Dwell time50 E.coil atcc25922 1h D2O 852nm 40mw 400mw tune43.08 60x oil obj 003 263
Step size0Dwell time50 P.a atcc27853 Gen 0.25ug 852nm 30mw 300mw tune 43.03 001 505
Step size0Dwell time50 E.faecium atcc 29212 Ery 1ug 852nm 40mw 400mw tune 43.08 003 262
Step size0Dwell time50 S.a atcc 29213 Linezolid 1ug 852nm 40mw 400mw tune 43.08 002 504
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 0.50.5ug 40mw 400mw tune 43.08 001 510
Step size0Dwell time50 E.faecium atcc 29212 Ery 1ug 852nm 40mw 400mw tune 43.08 002 276
Step size0Dwell time50 E.faecium atcc 29212 Ery 2ug 852nm 40mw 400mw tune 43.08 003 538
Step size0Dwell time50 P.a atcc27853 Levofloxacin-11.29 0.5ug 852nm 30mw 300mw tune 43.06 002 289
Step size0Dwell time50 E.faecium atcc 29212 Amp 0.25ug 852nm 40mw 400mw tune 43.08 003 316
Step size0Dwell time50 S.a atcc 29213 Linezolid 4ug 852nm 40mw 400mw tune 43.08 001 470
Step size0Dwell time50 E.faecium atcc 29212 Ery 4ug 852nm 40mw 400mw tune 43.08 001 464
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 8ug 852nm 30mw 300mw tune 43.00 001 302
Step size0Dwell time50 S.a atcc 29213 Linezolid 16ug 852nm 40mw 400mw tune 43.08 002 458
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 256ug 852nm 30mw 300mw tune 43.00 005 114
Step size0Dwell time50 E.coil atcc25922 Gentamicin 0.5ug 852nm 30mw 300mw tune 43.04 006 100
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 8ug 852nm 30mw 300mw tune 43.00 003 128
Step size0Dwell time50 P.a atcc27853 Amipicillin 16ug 852nm 30mw 300mw tune 43.03 002 29
Step size0Dwell time50 Clinical Sample K. p D2O 0ug 852nm 30mw 300mw tune 43.00 004 15
Step size0Dwell time50 E.coil atcc 25922 12.16 D2O 852nm 40mw 400mw tune 43.08 002 17
Step size0Dwell time50 S.a atcc 29213 Linezolid 0.5ug 852nm 40mw 400mw tune 43.08 004 116
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 0.125ug 852nm 40mw 400mw tune 43.08 005 102
Step size0Dwell time50 E.faecium atcc 29212 Amp 0.25ug 852nm 40mw 400mw tune 43.08 001 499
Step size0Dwell time50 E.faecium atcc 29212 Ery 2ug 852nm 40mw 400mw tune 43.08 001 328
Step size0Dwell time50 E.coil atcc25922 Ceftazidime 4ug 852nm 40mw 400mw tune43.08 60x oil obj 004 472
Step size0Dwell time50 Clinical Sample K. p Tobramycin 4ug 852nm 30mw 300mw tune 43.00 003 314
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 0.50.5ug 40mw 400mw tune 43.08 003 300
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 0.50.5ug 40mw 400mw tune 43.08 002 466
Step size0Dwell time50 E.faecium atcc 29212 Ery 1ug 852nm 40mw 400mw tune 43.08 001 248
Step size0Dwell time50 E.coil atcc25922 Ceftazidime 4ug 852nm 40mw 400mw tune43.08 60x oil obj 005 506
Step size0Dwell time50 Clinical Sample K. p Tobramycin 4ug 852nm 30mw 300mw tune 43.00 002 260
Step size0Dwell time50 S.a atcc 29213 Linezolid 4ug 852nm 40mw 400mw tune 43.08 002 274
Step size0Dwell time50 E.faecium atcc 29212 Ery 4ug 852nm 40mw 400mw tune 43.08 002 512
Step size0Dwell time50 Clinical Sample K. p Tobramycin 64ug 852nm 30mw 300mw tune 43.00 003_over-exposure 275
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 0.125ug 852nm 40mw 400mw tune 43.08 004 513
Step size0Dwell time50 S.a atcc 29213 Linezolid 0.5ug 852nm 40mw 400mw tune 43.08 005 507
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 1ug 40mw 400mw tune 43.08 004 261
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 8ug 852nm 30mw 300mw tune 43.00 002 249
Step size0Dwell time50 S.a atcc 29213 Linezolid 16ug 852nm 40mw 400mw tune 43.08 001 301
Step size0Dwell time50 E.coil atcc25922 Gentamicin 0.5ug 852nm 30mw 300mw tune 43.04 003 467
Step size0Dwell time50 Clinical Sample K. p D2O 0ug 852nm 30mw 300mw tune 43.00 001 473
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 4ug 40mw 400mw tune 43.08 002 315
Step size0Dwell time50 S.a atcc 29213 Linezolid 0.5ug 852nm 40mw 400mw tune 43.08 001 329
Step size0Dwell time50 E.coil ATCC25922 PBb Tobramycin 0.25ug 852nm 30mw 300mw tune 43.02 002 498
Step size0Dwell time30 P.a atcc27853 D2O OVERNIGHT 852nm 30mw 300mw tune 43.01 005 103
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 2ug 852nm 40mw 400mw tune 43.08 001 117
Step size0Dwell time50 P.a atcc27853 Imipenen LB 852nm 30mw 300mw tune 43.02 007 16
Step size0Dwell time50 S.a atcc 29213 Linezolid 1ug 852nm 40mw 400mw tune 43.08 005 12
Step size0Dwell time50 S.a atcc 29213 Linezolid 1ug 852nm 40mw 400mw tune 43.08 004 113
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 4ug 852nm 40mw 400mw tune 43.08 002 107
Step size0Dwell time50 S.a atcc 29213 Linezolid 2ug 852nm 40mw 400mw tune 43.08 005 488
Step size0Dwell time50 Clinical Sample K. p LB 0ug 852nm 30mw 300mw tune 43.00 002 311
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 1ug 852nm 40mw 400mw tune 43.08 001 477
Step size0Dwell time50 E.coil ATCC25922 PBb Tobramycin 0.25ug 852nm 30mw 300mw tune 43.02 003 463
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 4ug 40mw 400mw tune 43.08 003 305
Step size0Dwell time50 E.coil atcc25922 1h D2O 852nm 30mw 300mw tune43.08 60x oil obj 002 339
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 256ug 852nm 30mw 300mw tune 43.00 003 265
Step size0Dwell time50 S.a atcc 29213 Linezolid 16ug 852nm 40mw 400mw tune 43.08 004 503
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 64ug 852nm 30mw 300mw tune 43.00 003_over-exposure 517
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 256ug 852nm 30mw 300mw tune 43.00 001 271
Step size0Dwell time50 P.a 1h d2o 852nm 30mw 300mw tune 43.06 002 259
Step size0Dwell time50 Clinical Sample K. p D2O 0ug 852nm 30mw 300mw tune 43.00 002 258
Step size0Dwell time50 P.a atcc27853 Levofloxacin-11.29 8ug 852nm 30mw 300mw tune 43.06 001 516
Step size0Dwell time50 S.a atcc 29213 Linezolid 0.5ug 852nm 40mw 400mw tune 43.08 002 270
Step size0Dwell time50 E.coil atcc 25922 12.16 D2O 852nm 40mw 400mw tune 43.08 004 264
Step size0Dwell time50 E.coil ATCC25922 PBb Tobramycin 0.25ug 852nm 30mw 300mw tune 43.02 001 502
Step size0Dwell time50 S.a atcc 29213 Linezolid 4ug 852nm 40mw 400mw tune 43.08 005 338
Step size0Dwell time50 E.faecium atcc 29212 Ery 0.5ug 852nm 40mw 400mw tune 43.08 003 462
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 2ug 852nm 40mw 400mw tune 43.08 002 304
Step size0Dwell time50 E.coil atcc25922 Ceftazidime 4ug 852nm 40mw 400mw tune43.08 60x oil obj 002 310
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 0.50.5ug 40mw 400mw tune 43.08 004 476
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 4ug 852nm 40mw 400mw tune 43.08 001 489
Step size0Dwell time50 E.coil atcc25922 Ceftazidime 4ug 852nm 40mw 400mw tune43.08 60x oil obj 003 106
Step size0Dwell time50 Clinical Sample K. p Tobramycin 4ug 852nm 30mw 300mw tune 43.00 004 112
Step size0Dwell time50 P.a atcc27853 LB-12.2 852nm 30mw 300mw tune 43.01 002 13
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 2ug 852nm 40mw 400mw tune 43.08 003 39
Step size0Dwell time50 Clinical Sample K. p Tobramycin 64ug 852nm 30mw 300mw tune 43.00 002_over-exposure 11
Step size0Dwell time50 E.faecium atcc 29212 Ery 0.5ug 852nm 40mw 400mw tune 43.08 002 104
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 1ug 852nm 40mw 400mw tune 43.08 002 110
Step size0Dwell time50 S.a atcc 29213 Linezolid 4ug 852nm 40mw 400mw tune 43.08 004 138
Step size0Dwell time50 E.coil atcc25922 1h D2O 852nm 30mw 300mw tune43.08 60x oil obj 001 306
Step size0Dwell time50 Clinical Sample K. p D2O 0ug 852nm 30mw 300mw tune 43.00 003 460
Step size0Dwell time50 E.faecium atcc 29212 Amp 0.5ug 852nm 40mw 400mw tune 43.08 005 474
Step size0Dwell time50 K.p atcc 700603 12.16 Tobramycin 2ug 40mw 400mw tune 43.08 001 312
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 8ug 40mw 400mw tune 43.08 003 448
Step size0Dwell time50 E.coil atcc25922 Ceftazidime 0.25ug 852nm 40mw 400mw tune43.08 60x oil obj 003 299
Step size0Dwell time50 S.a atcc 29213 Eryth 0.25ug 852nm 40mw 400mw tune 43.08 003 272
Step size0Dwell time50 Clinical Sample K. p Tobramycin 32ug 852nm 30mw 300mw tune 43.00 002_over-exposure 514
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 2ug 40mw 400mw tune 43.08 003 500
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 0.25ug 852nm 40mw 400mw tune 43.08 001 266
Step size0Dwell time50 Clinical Sample K. p Tobramycin 4ug 852nm 30mw 300mw tune 43.00 001_over-exposure 528
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 8ug40mw 400mw tune 43.08 004 529
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 16ug40mw 400mw tune 43.08 001 501
Step size0Dwell time50 K.p atcc 700603 12.16 Gentsmincin 16ug 40mw 400mw tune 43.08 003 267
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.5ug 852nm 40mw 400mw tune 43.08 003 273
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 128ug 852nm 30mw 300mw tune 43.00 001 515
Step size0Dwell time50 K.p atcc700603 Imipenen 0.5ug 852nm 40mw 400mw tune43.08 003 298
Step size0Dwell time50 E.coil atcc25922 Ceftazidime 2ug 852nm 40mw 400mw tune43.08 60x oil obj 001 449
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.0625 852nm 40mw 400mw tune 43.08 003 475
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.25ug 852nm 40mw 400mw tune 43.08 001 313
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 0.5ug 852nm 40mw 400mw tune 43.08 003 307
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 0.25ug 852nm 40mw 400mw tune 43.08 005 461
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.125ug 852nm 40mw 400mw tune 43.08 002 139
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.125ug 852nm 40mw 400mw tune 43.08 003 111
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 0.25ug 852nm 40mw 400mw tune 43.08 004 105
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 0.5ug 852nm 40mw 400mw tune 43.08 002 10
Step size0Dwell time50 K.p atcc700603 Imipenen 0.5ug 852nm 40mw 400mw tune43.08 002 38
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.5ug 852nm 40mw 400mw tune 43.08 002 21
Step size0Dwell time50 P.a atcc 27853 Ceft 0.5ug 852nm 30mw 300mw tune 43.03 002 35
191128-Step size0Dwell time50 P.a overnight Gen 4ug 852nm 30mw 300mw tune 43.05 001 108
Step size0Dwell time50 K.p atcc 700603 12.16 Gentsmincin 16ug 40mw 400mw tune 43.08 002 120
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 0.25ug 852nm 30mw 300mw tune 43.02 001 134
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 2ug 40mw 400mw tune 43.08 002 487
Step size0Dwell time50 P.a atcc 29213 Gen-r 2ug 852nm 30mw 300mw tune43.05 010 493
Step size0Dwell time50 E.faecium atcc 29212 Amp 16ug 852nm 40mw 400mw tune 43.08 003 478
Step size0Dwell time50 E.coil atcc25922 Ceftazidime 0.25ug 852nm 40mw 400mw tune43.08 60x oil obj 002 444
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 8ug 40mw 400mw tune 43.08 002 322
Step size0Dwell time50 E.faecium atcc 29212 Amp 0.5ug 852nm 40mw 400mw tune 43.08 004 336
Step size0Dwell time50 P.a overnight LB 852nm 30mw 300mw tune 43.05 001 450
Step size0Dwell time50 K.p atcc 700603 12.16 Tobramycin 2ug 40mw 400mw tune 43.08 002 295
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 0.25ug 852nm 40mw 400mw tune 43.08 002 281
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 16ug40mw 400mw tune 43.08 002 518
Step size0Dwell time50 K.p atcc 700603 12.16 Gentsmincin 2ug 40mw 400mw tune 43.08 002 530
Step size0Dwell time50 P.a atcc 29213 Gen 0.25ug 852nm 30mw 300mw tune43.05 003 256
Step size0Dwell time50 S.a atcc 29213 Vancomycin D2O 852nm 40mw 400mw tune 43.08 0088 242
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 128ug 852nm 30mw 300mw tune 43.00 002 524
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.25ug 852nm 40mw 400mw tune 43.08 002 243
Step size0Dwell time50 E.coil atcc25922 Ceftazidime 2ug 852nm 40mw 400mw tune43.08 60x oil obj 002 525
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.125ug 852nm 40mw 400mw tune 43.08 001 531
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 0.5ug 852nm 40mw 400mw tune 43.08 001 257
Step size0Dwell time50 P.a atcc27853 Amipicillin 64ug 852nm 30mw 300mw tune 43.03 002 519
Step size0Dwell time50 E.coil atcc25922 Ceftazidime 2ug 852nm 40mw 400mw tune43.08 60x oil obj 003 280
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.25ug 852nm 40mw 400mw tune 43.08 003 294
Step size0Dwell time50 S.a atcc 29213 Vancomycin D2O 852nm 40mw 400mw tune 43.08 0089 337
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 128ug 852nm 30mw 300mw tune 43.00 003 451
Step size0Dwell time50 K.p atcc700603 Imipenen 0.5ug 852nm 40mw 400mw tune43.08 001 445
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.5ug 852nm 40mw 400mw tune 43.08 001 323
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 16ug40mw 400mw tune 43.08 003 479
Step size0Dwell time50 K.p atcc 700603 12.16 Gentsmincin 2ug 40mw 400mw tune 43.08 003 492
Step size0Dwell time50 K.p atcc 700603 12.16 Gentsmincin 16ug 40mw 400mw tune 43.08 001 486
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 0.25ug 852nm 30mw 300mw tune 43.02 002 135
Step size0Dwell time50 S.a atcc 29213 Eryth 0.25ug 852nm 40mw 400mw tune 43.08 001 121
Step size0Dwell time50 E.coil atcc25922 Amipicillin 2ug 852nm 40mw 400mw tune43.08 60x oil obj 002 109
Step size0Dwell time50 K.p atcc 700603 12.16 Tobramycin 2ug 40mw 400mw tune 43.08 003 34
Step size0Dwell time50 E.coil atcc25922 Ceftazidime 0.25ug 852nm 40mw 400mw tune43.08 60x oil obj 001 20
Step size0Dwell time10 E.coil atcc25922 1h d2o 852nm 30mw 300mw tune 43.04 0088 36
Step size0Dwell time50 E.coil atcc25922 Ceftazidime 0.25ug 852nm 40mw 400mw tune43.08 60x oil obj 005 22
Step size0Dwell time50 S.a atcc 29213 Eryth 0.0625ug 852nm 40mw 400mw tune 43.08 002 137
Step size0Dwell time50 E.faecium atcc 29212 Amp 16ug 852nm 40mw 400mw tune 43.08 004 123
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.0625ug 852nm 40mw 400mw tune 43.08 003 490
Step size0Dwell time50 K.p atcc 700603 12.16 D2O 40mw 400mw tune 43.08 0077 484
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 8ug40mw 400mw tune 43.08 002 309
Step size0Dwell time50 Clinical Sample K. p Tobramycin 128ug 852nm 30mw 300mw tune 43.00 001 453
Step size0Dwell time50 S.a atcc 29213 Eryth 1ug 852nm 40mw 400mw tune 43.08 001 335
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.125ug 852nm 40mw 400mw tune 43.08 004 321
Step size0Dwell time50 E.coil atcc25922 Amipicillin 1ug 852nm 40mw 400mw tune43.08 60x oil obj 001 447
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.0625 852nm 40mw 400mw tune 43.08 004 282
Step size0Dwell time50 S.a atcc 29213 Eryth 2ug 852nm 40mw 400mw tune 43.08 001 296
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.125ug 852nm 40mw 400mw tune 43.08 005 269
Step size0Dwell time50 P.a atcc27853 Imipenen 0.5ug 852nm 30mw 300mw tune 43.06 003 527
191128-Step size0Dwell time50 P.a overnight d2o 852nm 30mw 300mw tune 43.05 00191128-5 241
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.5ug 852nm 40mw 400mw tune 43.08 004 255
Step size0Dwell time50 P.a atcc 27853 Ceft D2O that day cultured 852nm 30mw 300mw tune 43.03 001 533
Step size0Dwell time50 P.a atcc 29213 Gen 1ug 852nm 30mw 300mw tune43.05 001-1 254
Step size0Dwell time50 E.faecium atcc 29212 Amp 8ug 852nm 40mw 400mw tune 43.08 001 532
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 8ug40mw 400mw tune 43.08 003 526
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.0625ug 852nm 40mw 400mw tune 43.08 002 240
Step size0Dwell time50 S.a atcc 29213 Eryth 0.0625ug 852nm 40mw 400mw tune 43.08 003 268
Step size0Dwell time50 E.faecium atcc 29212 Amp 0.5ug 852nm 40mw 400mw tune 43.08 002 297
Step size0Dwell time50 K.p atcc 700603 12.16 Tobramycin 2ug 40mw 400mw tune 43.08 004 283
Step size0Dwell time50 E.coil atcc25922 Ceftazidime 0.25ug 852nm 40mw 400mw tune43.08 60x oil obj 006 320
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 8ug40mw 400mw tune 43.08 001 446
Step size0Dwell time50 K.p atcc 700603 12.16 Gentsmincin 2ug 40mw 400mw tune 43.08 004 452
Step size0Dwell time50 E.faecium atcc 29212 Amp 8ug 852nm 40mw 400mw tune 43.08 003 334
Step size0Dwell time50 Clinical Sample K. p Tobramycin 128ug 852nm 30mw 300mw tune 43.00 002 308
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 128ug 852nm 30mw 300mw tune 43.00 004 485
Step size0Dwell time50 S.a atcc 29213 Eryth 1ug 852nm 40mw 400mw tune 43.08 002 491
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 0.25ug 852nm 40mw 400mw tune 43.08 003-1 122
Step size0Dwell time50 E.coil atcc25922 Amipicillin 1ug 852nm 40mw 400mw tune43.08 60x oil obj 002 136
Step size0Dwell time50 S.a atcc 29213 Eryth 2ug 852nm 40mw 400mw tune 43.08 003 23
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.25ug 852nm 40mw 400mw tune 43.08 004 37
Step size0Dwell time50 S.a atcc 29213 Eryth 2ug 852nm 40mw 400mw tune 43.08 002 33
Step size0Dwell time50 E.coil atcc25922 Amipicillin 1ug 852nm 40mw 400mw tune43.08 60x oil obj 003 27
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 0.25ug 852nm 40mw 400mw tune 43.08 001 132
Step size0Dwell time50 S.a atcc 29213 Eryth 1ug 852nm 40mw 400mw tune 43.08 003 126
Step size0Dwell time50 Clinical Sample K. p Tobramycin 128ug 852nm 30mw 300mw tune 43.00 003 495
Step size0Dwell time50 E.faecium atcc 29212 Amp 8ug 852nm 40mw 400mw tune 43.08 002 481
Step size0Dwell time50 P.a atcc27853 Amipicillin 32ug 852nm 30mw 300mw tune 43.03 001 330
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.0625ug 852nm 40mw 400mw tune 43.08 001 456
Step size0Dwell time50 E.coil atcc25922 Amipicillin 2ug 852nm 40mw 400mw tune43.08 60x oil obj 004 442
Step size0Dwell time50 E.faecium atcc 29212 Amp 0.5ug 852nm 40mw 400mw tune 43.08 001 324
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 128ug40mw 400mw tune 43.08 002 318
Step size0Dwell time50 K.p atcc700603 Imipenen 2ug 852nm 40mw 400mw tune43.08 004 287
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 64ug 852nm 30mw 300mw tune 43.00 002 293
Step size0Dwell time50 E.coil ATCC25922 PBb Tobramycin 1ug 852nm 30mw 300mw tune 43.02 002 244
Step size0Dwell time50 S.a atcc 29213 Linezolid 8ug 852nm 40mw 400mw tune 43.08 001 522
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 1ug 40mw 400mw tune 43.08 005 536
Step size0Dwell time50 E.faecium atcc 29212 Ery 8ug 852nm 40mw 400mw tune 43.08 001 250
Step size0Dwell time50 S.a atcc 29213 Eryth 0.125ug 852nm 40mw 400mw tune 43.08 002 278
Step size0Dwell time50 P.a 1h d2o 852nm 30mw 300mw tune 43.05 003 279
Step size0Dwell time50 S.a atcc 29213 Ampicillin 2ug 852nm 40mw 400mw tune 43.08 001 537
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 0.5ug 852nm 30mw 300mw tune 43.02 004 251
Step size0Dwell time50 Clinical Sample K. p Tobramycin 8ug 852nm 30mw 300mw tune 43.00 001 245
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 0.0625ug 852nm 40mw 400mw tune 43.08 004 523
Step size0Dwell time10 E.coil atcc25922 Gentamicin 0.5ug 852nm 30mw 300mw tune 43.04 002 292
Step size0Dwell time50 S.a atcc 29213 Eryth 0.5ug 852nm 40mw 400mw tune 43.08 001 286
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 4ug 40mw 400mw tune 43.08 006 319
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 64ug 852nm 30mw 300mw tune 43.00 002 443
Step size0Dwell time50 E.coil ATCC25922 LB 852nm 30mw 300mw tune 43.02 001 325
Step size0Dwell time50 K.p atcc 700603 12.16 Tobramycin 4ug 40mw 400mw tune 43.08 004 331
Step size0Dwell time50 K.p atcc 700603 12.16 D2O 40mw 400mw tune 43.08 001 457
Step size0Dwell time50 Clinical Sample K. p Tobramycin 64ug 852nm 30mw 300mw tune 43.00 001 480
Step size0Dwell time50 Clinical Sample K. p Tobramycin 32ug 852nm 30mw 300mw tune 43.00 004 494
Step size0Dwell time50 E.coil atcc25922 Imipenen 2ug 852nm 40mw 400mw tune43.08 60x oil obj 003 127
Step size0Dwell time50 E.coil atcc 25922 12.16 D2O 852nm 40mw 400mw tune 43.08 003- 133
Step size0Dwell time50 P.a atcc27853 Levofloxacin-11.29 4ug 852nm 30mw 300mw tune 43.06 004 26
Step size0Dwell time50 S.a atcc 29213 Ampicillin 1ug 852nm 40mw 400mw tune 43.08 001 32
Step size0Dwell time50 E.coil atcc25922 Imipenen 1ug 852nm 40mw 400mw tune43.08 60x oil obj 004 18
Step size0Dwell time50 S.a atcc 29213 Eryth 0.125ug 852nm 40mw 400mw tune 43.08 003 24
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 64ug 852nm 30mw 300mw tune 43.00 003 30
Step size0Dwell time50 S.a atcc 29213 Ampicillin 4ug 852nm 40mw 400mw tune 43.08 002 125
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 128ug40mw 400mw tune 43.08 003 131
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 128ug40mw 400mw tune 43.08 001 119
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 64ug 852nm 30mw 300mw tune 43.00 001 482
Step size0Dwell time50 S.a atcc 29213 Linezolid 8ug 852nm 40mw 400mw tune 43.08 002 496
Step size0Dwell time50 K.p atcc 700603 12.16 Tobramycin 16ug 40mw 400mw tune 43.08 004 327
Step size0Dwell time50 E.coil ATCC25922 PBb Tobramycin 1ug 852nm 30mw 300mw tune 43.02 001 441
Step size0Dwell time50 S.a atcc 29213 Vancomycin LB 852nm 40mw 400mw tune 43.08 0089 455
Step size0Dwell time50 E.faecium atcc 29212 Ery 8ug 852nm 40mw 400mw tune 43.08 002 333
Step size0Dwell time50 S.a atcc 29213 Eryth 0.125ug 852nm 40mw 400mw tune 43.08 001 469
Step size0Dwell time50 K.p atcc700603 Imipenen 4ug 852nm 40mw 400mw tune43.08 005 290
Step size0Dwell time50 S.a atcc 29213 Ampicillin 2ug 852nm 40mw 400mw tune 43.08 002 284
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 32ug 852nm 30mw 300mw tune 43.00 004 253
Step size0Dwell time50 E.coil atcc25922 Ceftazime 1ug 852nm 40mw 400mw tune43.08 60x oil obj 004 535
Step size0Dwell time50 S.a atcc 29213 Ampicillin 1ug 852nm 40mw 400mw tune 43.08 003 521
Step size0Dwell time10 E.coil atcc25922 Gentamicin 0.5ug 852nm 30mw 300mw tune 43.04 001 247
Step size0Dwell time50 Clinical Sample K. p Tobramycin 8ug 852nm 30mw 300mw tune 43.00 002 509
Step size0Dwell time50 E.coil atcc25922 Imipenen 1ug 852nm 40mw 400mw tune43.08 60x oil obj 006 508
Step size0Dwell time50 S.a atcc 29213 Eryth 0.5ug 852nm 40mw 400mw tune 43.08 002 520
Step size0Dwell time50 E.coil atcc25922 Imipenen 0.25ug 852nm 40mw 400mw tune43.08 60x oil obj 009 246
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 32ug 852nm 30mw 300mw tune 43.00 004 252
Step size0Dwell time50 E.coil atcc25922 Gentamicin 0.25ug 852nm 30mw 300mw tune 43.04 003 534
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 64ug 852nm 30mw 300mw tune 43.00 001 285
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 512ug 852nm 30mw 300mw tune 43.00 004 291
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 256ug 852nm 30mw 300mw tune 43.00 004 468
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 64ug 40mw 400mw tune 43.08 004 454
Step size0Dwell time50 E.coil ATCC25922 LB 852nm 30mw 300mw tune 43.02 002 332
Step size0Dwell time50 K.p atcc 700603 12.16 D2O 40mw 400mw tune 43.08 003 326
Step size0Dwell time50 S.a atcc 29213 Linezolid 0.25ug 852nm 40mw 400mw tune 43.08 005 440
Step size0Dwell time50 S.a atcc 29213 Linezolid 0.25ug 852nm 40mw 400mw tune 43.08 004 497
Step size0Dwell time50 K.p atcc 700603 12.16 D2O 40mw 400mw tune 43.08 002 483
Step size0Dwell time50 E.coil ATCC25922 LB 852nm 30mw 300mw tune 43.02 003 118
Step size0Dwell time50 E.coil atcc25922 Gentamicin 0.25ug 852nm 30mw 300mw tune 43.04 002 130
Step size0Dwell time50 E.coil atcc25922 Imipenen 1ug 852nm 40mw 400mw tune43.08 60x oil obj 007 124
Step size0Dwell time50 S.a atcc 29213 Ampicillin 1ug 852nm 40mw 400mw tune 43.08 002 31
Step size0Dwell time50 Clinical Sample K. p Tobramycin 8ug 852nm 30mw 300mw tune 43.00 003 25
Step size0Dwell time50 P.a atcc 29213 Gen 0.5ug 852nm 30mw 300mw tune43.05 001 19
Step size0Dwell time50 S.a atcc 29213 Ampicillin 2ug 852nm 40mw 400mw tune 43.08 003 42
Step size0Dwell time50 E.faecium atcc 29212 Ery 8ug 852nm 40mw 400mw tune 43.08 003 4
Step size0Dwell time50 S.a atcc 29213 Linezolid 8ug 852nm 40mw 400mw tune 43.08 003 56
Step size0Dwell time50 S.a atcc 29213 Ampicillin 4ug 852nm 40mw 400mw tune 43.08 001 180
Step size0Dwell time50 K.p atcc700603 Imipenen 2ug 852nm 40mw 400mw tune43.08 002 194
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 64ug 852nm 30mw 300mw tune 43.00 004 81
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 128ug40mw 400mw tune 43.08 004 95
Step size0Dwell time50 K.p atcc700603 Imipenen 1ug 852nm 40mw 400mw tune43.08 003 143
Step size0Dwell time50 E.coil ATCC25922 PBb Tobramycin 1ug 852nm 30mw 300mw tune 43.02 004 157
Step size0Dwell time50 K.p atcc 700603 12.16 Tobramycin 32ug 40mw 400mw tune 43.08 003 382
Step size0Dwell time50 K.p atcc 700603 12.16 Gentsmincin 4ug 40mw 400mw tune 43.08 002 396
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 0.0625ug 852nm 40mw 400mw tune 43.08 002 369
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 32ug 852nm 30mw 300mw tune 43.00 001 341
Step size0Dwell time50 E.coil atcc25922 Ceftazime 1ug 852nm 40mw 400mw tune43.08 60x oil obj 001 427
Step size0Dwell time50 E.coil atcc25922 Imipenen 2ug 852nm 40mw 400mw tune43.08 60x oil obj 004 433
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 32ug 852nm 30mw 300mw tune 43.00 001 355
Step size0Dwell time50 Clinical Sample K. p Tobramycin 32ug 852nm 30mw 300mw tune 43.00 003 209
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.5ug 852nm 40mw 400mw tune 43.08 0089 235
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 256ug 852nm 30mw 300mw tune 43.00 001 553
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 64ug 40mw 400mw tune 43.08 001 547
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.25ug 852nm 40mw 400mw tune 43.08 0089 221
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 64ug 852nm 30mw 300mw tune 43.00 004 546
Step size0Dwell time50 K.p atcc 700603 12.16 Tobramycin 4ug 40mw 400mw tune 43.08 002 220
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 0.5ug 852nm 40mw 400mw tune 43.08 001 234
Step size0Dwell time50 K.p atcc 700603 12.16 Tobramycin 4ug 40mw 400mw tune 43.08 003 552
Step size0Dwell time50 S.a atcc 29213 Linezolid 0.25ug 852nm 40mw 400mw tune 43.08 001 208
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.25ug 852nm 40mw 400mw tune 43.08 0088 432
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 4ug 40mw 400mw tune 43.08 001 354
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.5ug 852nm 40mw 400mw tune 43.08 0088 340
Step size0Dwell time50 Clinical Sample K. p Tobramycin 32ug 852nm 30mw 300mw tune 43.00 002 426
Step size0Dwell time50 P.a atcc27853 Levofloxacin-11.29 4ug 852nm 30mw 300mw tune 43.06 002 368
Step size0Dwell time50 E.coil atcc25922 Imipenen 1ug 852nm 40mw 400mw tune43.08 60x oil obj 002 397
Step size0Dwell time50 P.a atcc27853 Amipicillin 128ug 852nm 30mw 300mw tune 43.03 001 383
Step size0Dwell time50 K.p atcc 700603 12.16 Gentsmincin 4ug 40mw 400mw tune 43.08 003 156
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 0.5ug 852nm 30mw 300mw tune 43.02 003 142
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 0.0625ug 852nm 40mw 400mw tune 43.08 003 94
Step size0Dwell time50 K.p atcc 700603 12.16 Tobramycin 32ug 40mw 400mw tune 43.08 002 80
Step size0Dwell time50 K.p atcc700603 Imipenen 4ug 852nm 40mw 400mw tune43.08 001 195
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 1ug 40mw 400mw tune 43.08 002 181
Step size0Dwell time50 K.p atcc700603 Imipenen 1ug 852nm 40mw 400mw tune43.08 002 5
Step size0Dwell time50 K.p atcc700603 Imipenen 2ug 852nm 40mw 400mw tune43.08 003 57
Step size0Dwell time50 K.p atcc700603 Imipenen 2ug 852nm 40mw 400mw tune43.08 001 43
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 512ug 852nm 30mw 300mw tune 43.00 001_over-expousre 55
Step size0Dwell time50 E.faecium atcc 29212 Ery 8ug 852nm 40mw 400mw tune 43.08 004 7
Step size0Dwell time50 S.a atcc 29213 Linezolid 8ug 852nm 40mw 400mw tune 43.08 004 41
Step size0Dwell time50 P.a atcc27853 D2O-12.2 852nm 30mw 300mw tune 43.01 001 69
Step size0Dwell time50 S.a atcc 29213 Ampicillin 2ug 852nm 40mw 400mw tune 43.08 004 197
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 64ug 40mw 400mw tune 43.08 002 183
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 0.0625ug 852nm 40mw 400mw tune 43.08 001 96
Step size0Dwell time50 K.p atcc 700603 12.16 Gentsmincin 4ug 40mw 400mw tune 43.08 001 168
Step size0Dwell time50 Clinical Sample K. p Tobramycin 8ug 852nm 30mw 300mw tune 43.00 004 82
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 32ug 852nm 30mw 300mw tune 43.00 002 154
Step size0Dwell time50 E.coil atcc25922 Ceftazime 1ug 852nm 40mw 400mw tune43.08 60x oil obj 002 140
Step size0Dwell time50 K.p atcc 700603 12.16 LB 40mw 400mw tune 43.08 003 395
Step size0Dwell time50 S.a atcc 29213 Eryth 0.5ug 852nm 40mw 400mw tune 43.08 004 381
Step size0Dwell time50 E.coil atcc 25922 12.16 D2O 852nm 40mw 400mw tune 43.08 002- 418
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 32ug 852nm 30mw 300mw tune 43.00 002 356
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 4ug 40mw 400mw tune 43.08 003 430
424
342
222
544
550
236
551
237
223
545
425
343
357
431
419
380
394
141
155
83
97
169
182
68
196
40
54
6
192
78
186
2
50
44
151
145
93
87
179
390
384
435
353
347
421
409
541
227
233
555
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 256ug 852nm 30mw 300mw tune 43.00 002
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 64ug 40mw 400mw tune 43.08 002
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 512ug 852nm 30mw 300mw tune 43.00 002
Step size0Dwell time50 P.a atcc27853 Levofloxacin-11.29 2ug 852nm 30mw 300mw tune 43.06 002
Step size0Dwell time50 S.a atcc 29213 Linezolid 0.25ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 K.p atcc 700603 12.16 Tobramycin 4ug 40mw 400mw tune 43.08 001
Step size0Dwell time50 P.a atcc27853 Levofloxacin-11.29 1ug 852nm 30mw 300mw tune 43.06 003
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 0.5ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 0.5ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 S.a atcc 29213 Linezolid 0.25ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 P.a atcc27853 Levofloxacin-11.29 2ug 852nm 30mw 300mw tune 43.06 003
Step size0Dwell time50 Clinical Sample K. p Tobramycin 64ug 852nm 30mw 300mw tune 43.00 004
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 512ug 852nm 30mw 300mw tune 43.00 003
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 64ug 40mw 400mw tune 43.08 003
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 256ug 852nm 30mw 300mw tune 43.00 003
Step size0Dwell time50 P.a 1h lb 852nm 30mw 300mw tune 43.03 005
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 32ug 852nm 30mw 300mw tune 43.00 003
Step size0Dwell time50 P.a atcc27853 Levofloxacin-11.29 4ug 852nm 30mw 300mw tune 43.06 001
Step size0Dwell time50 K.p atcc 700603 12.16 LB 40mw 400mw tune 43.08 002
Step size0Dwell time50 E.coil atcc25922 Ceftazime 1ug 852nm 40mw 400mw tune43.08 60x oil obj 003
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 32ug 852nm 30mw 300mw tune 43.00 003
Step size0Dwell time50 S.a atcc 29213 Ampicillin 1ug 852nm 40mw 400mw tune 43.08 004
Step size0Dwell time50 E.coil atcc25922 Imipenen 1ug 852nm 40mw 400mw tune43.08 60x oil obj 001
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 64ug 40mw 400mw tune 43.08 003
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 1ug 40mw 400mw tune 43.08 001
Step size0Dwell time50 K.p atcc700603 Imipenen 1ug 852nm 40mw 400mw tune43.08 001
...@@ -40,11 +40,11 @@ class MultiUnet(nn.Module): ...@@ -40,11 +40,11 @@ class MultiUnet(nn.Module):
self.res9 = MultiResBlock(self.up9.outc*2, 32) self.res9 = MultiResBlock(self.up9.outc*2, 32)
self.pool = nn.MaxPool2d(2) self.pool = nn.MaxPool2d(2)
# self.outconv = nn.Sequential( self.outconv = nn.Sequential(
# nn.Conv2d(self.res9.outc, n_classes, kernel_size = 1), nn.Conv2d(self.res9.outc, n_classes, kernel_size = 1),
# nn.Sigmoid() nn.Sigmoid()
# ) )
self.outconv = nn.Conv2d(self.res9.outc, n_classes,kernel_size = 1) # self.outconv = nn.Conv2d(self.res9.outc, n_classes,kernel_size = 1)
def forward(self, x): def forward(self, x):
x = self.inconv(x) x = self.inconv(x)
......
...@@ -4,7 +4,7 @@ import torch ...@@ -4,7 +4,7 @@ import torch
import torchvision import torchvision
import torch.nn as nn import torch.nn as nn
import torch.nn.functional as F import torch.nn.functional as F
import torchsnooper # import torchsnooper
def conv(in_channel, out_channel): def conv(in_channel, out_channel):
...@@ -37,7 +37,7 @@ class MultiResBlock(nn.Module): ...@@ -37,7 +37,7 @@ class MultiResBlock(nn.Module):
self.norm = nn.BatchNorm2d(self.outc) self.norm = nn.BatchNorm2d(self.outc)
self.seq = nn.Sequential(nn.ReLU(inplace = True), nn.BatchNorm2d(self.outc)) self.seq = nn.Sequential(nn.ReLU(inplace = True), nn.BatchNorm2d(self.outc))
#@torchsnooper.snoop() # @torchsnooper.snoop()
def forward(self, x): def forward(self, x):
shortcut = self.shortcut(x) shortcut = self.shortcut(x)
......
...@@ -7,11 +7,12 @@ from tqdm import tqdm ...@@ -7,11 +7,12 @@ from tqdm import tqdm
import torch import torch
import torch.nn as nn import torch.nn as nn
from torch import optim from torch import optim
from torch.optim import lr_scheduler
from torchvision import transforms from torchvision import transforms
from torch.utils.data import DataLoader, random_split from torch.utils.data import DataLoader, random_split
from utils.dataset import BasicDataset,VOCSegmentation from utils.dataset import BasicDataset, VOCSegmentation
from utils.eval import eval_net from utils.eval import eval_net,eval_multi,eval_jac
dir_checkpoint = 'checkpoint/' dir_checkpoint = 'checkpoint/'
...@@ -27,7 +28,8 @@ def train_net(net, device, epochs = 5, batch_size = 1, lr = 0.1): ...@@ -27,7 +28,8 @@ def train_net(net, device, epochs = 5, batch_size = 1, lr = 0.1):
val_loader = DataLoader(evalset, batch_size = batch_size, shuffle = False, num_workers = 8, pin_memory = True) val_loader = DataLoader(evalset, batch_size = batch_size, shuffle = False, num_workers = 8, pin_memory = True)
optimizer = optim.Adam(net.parameters(), lr = lr) optimizer = optim.Adam(net.parameters(), lr = lr)
criterion = nn.BCEWithLogitsLoss() criterion = nn.BCELoss()#nn.BCEWithLogitsLoss()
scheduler = lr_scheduler.StepLR(optimizer,30,0.5)#lr_scheduler.ReduceLROnPlateau(optimizer, 'min')
for epoch in range(epochs): for epoch in range(epochs):
net.train() net.train()
...@@ -47,9 +49,13 @@ def train_net(net, device, epochs = 5, batch_size = 1, lr = 0.1): ...@@ -47,9 +49,13 @@ def train_net(net, device, epochs = 5, batch_size = 1, lr = 0.1):
loss.backward() loss.backward()
optimizer.step() optimizer.step()
pbar.update(imgs.shape[0]) pbar.update(imgs.shape[0])
dice = eval_net(net, val_loader, device, n_val)
val_score = eval_net(net, val_loader, device, n_val) jac = eval_jac(net,val_loader,device,n_val)
logging.info('Validation : {}'.format(val_score)) # overall_acc, avg_per_class_acc, avg_jacc, avg_dice = eval_multi(net, val_loader, device, n_val)
scheduler.step()
logging.info(f'Avg Dice:{dice}\n'
f'Jaccard:{jac}\n'
f'Learning Rate:{scheduler.get_lr()[0]}')
if epoch % 5 == 0: if epoch % 5 == 0:
try: try:
os.mkdir(dir_checkpoint) os.mkdir(dir_checkpoint)
......
...@@ -51,8 +51,7 @@ if __name__ == '__main__': ...@@ -51,8 +51,7 @@ if __name__ == '__main__':
logging.info(f'Network:\n' logging.info(f'Network:\n'
f'\t{net.n_channels} input channels\n' f'\t{net.n_channels} input channels\n'
f'\t{net.n_classes} output channels (classes)\n' f'\t{net.n_classes} output channels (classes)\n')
f'\t{"Bilinear" if net.bilinear else "Dilated conv"} upscaling')
if args.load: if args.load:
net.load_state_dict(torch.load(args.load, map_location = device)) net.load_state_dict(torch.load(args.load, map_location = device))
......
...@@ -9,6 +9,7 @@ import torch ...@@ -9,6 +9,7 @@ import torch
import torch.nn as nn import torch.nn as nn
from torch import optim from torch import optim
from torchvision import transforms from torchvision import transforms
from torch.optim import lr_scheduler
from tqdm import tqdm from tqdm import tqdm
from utils.eval import eval_net from utils.eval import eval_net
...@@ -46,6 +47,7 @@ def train_net(net, device, epochs = 5, batch_size = 1, lr = 0.1, save_cp = True) ...@@ -46,6 +47,7 @@ def train_net(net, device, epochs = 5, batch_size = 1, lr = 0.1, save_cp = True)
# optimizer = optim.Adam(net.parameters(), lr=lr, weight_decay = 1e-8) # optimizer = optim.Adam(net.parameters(), lr=lr, weight_decay = 1e-8)
optimizer = optim.RMSprop(net.parameters(), lr = lr, weight_decay = 1e-8) optimizer = optim.RMSprop(net.parameters(), lr = lr, weight_decay = 1e-8)
scheduler = lr_scheduler.ReduceLROnPlateau(optimizer, 'min')
# criterion = nn.BCEWithLogitsLoss() # criterion = nn.BCEWithLogitsLoss()
if net.n_classes > 1: if net.n_classes > 1:
criterion = nn.CrossEntropyLoss() criterion = nn.CrossEntropyLoss()
...@@ -54,7 +56,6 @@ def train_net(net, device, epochs = 5, batch_size = 1, lr = 0.1, save_cp = True) ...@@ -54,7 +56,6 @@ def train_net(net, device, epochs = 5, batch_size = 1, lr = 0.1, save_cp = True)
for epoch in range(epochs): for epoch in range(epochs):
net.train() net.train()
epoch_loss = 0 epoch_loss = 0
with tqdm(total = n_train, desc = f'Epoch {epoch + 1}/{epochs}', unit = 'img') as pbar: with tqdm(total = n_train, desc = f'Epoch {epoch + 1}/{epochs}', unit = 'img') as pbar:
for imgs,true_masks in train_loader: for imgs,true_masks in train_loader:
...@@ -82,8 +83,8 @@ def train_net(net, device, epochs = 5, batch_size = 1, lr = 0.1, save_cp = True) ...@@ -82,8 +83,8 @@ def train_net(net, device, epochs = 5, batch_size = 1, lr = 0.1, save_cp = True)
pbar.update(imgs.shape[0]) pbar.update(imgs.shape[0])
global_step += 1 # if global_step % (len(dataset) // (10 * batch_size)) == 0: global_step += 1 # if global_step % (len(dataset) // (10 * batch_size)) == 0:
val_score = eval_net(net, val_loader, device, n_val) val_score = eval_net(net, val_loader, device, n_val)
scheduler.step(val_score)
if net.n_classes > 1: if net.n_classes > 1:
logging.info('Validation cross entropy: {}'.format(val_score)) logging.info('Validation cross entropy: {}'.format(val_score))
writer.add_scalar('Loss/test', val_score, global_step) writer.add_scalar('Loss/test', val_score, global_step)
......
...@@ -8,9 +8,6 @@ import torch ...@@ -8,9 +8,6 @@ import torch
from torch.utils.data import Dataset from torch.utils.data import Dataset
import logging import logging
from PIL import Image from PIL import Image
import imgaug as ia
import imgaug.augmenters as iaa
from imgaug.augmentables.segmaps import SegmentationMapsOnImage
import os import os
from torchvision.datasets.vision import VisionDataset from torchvision.datasets.vision import VisionDataset
...@@ -87,10 +84,21 @@ class VOCSegmentation(VisionDataset): ...@@ -87,10 +84,21 @@ class VOCSegmentation(VisionDataset):
self.masks = [os.path.join(mask_dir, x + ".png") for x in file_names] self.masks = [os.path.join(mask_dir, x + ".png") for x in file_names]
assert (len(self.images) == len(self.masks)) assert (len(self.images) == len(self.masks))
self.seq = iaa.Sequential([iaa.SomeOf((0, 5), [iaa.Noop(), iaa.Fliplr(0.5), @classmethod
iaa.Sometimes(0.25, iaa.Dropout(p = (0, 0.1))), iaa.Affine(rotate = (-45, 45)), def preprocess(cls, pil_img):
iaa.ElasticTransformation(alpha = 50, sigma = 5) pil_img = pil_img.resize((256, 256))
], random_order = True)])
img_nd = np.array(pil_img)
if len(img_nd.shape) == 2:
img_nd = np.expand_dims(img_nd, axis = 2)
# HWC to CHW
img_trans = img_nd.transpose((2, 0, 1))
if img_trans.max() > 1:
img_trans = img_trans / 255
return img_trans
def __getitem__(self, index): def __getitem__(self, index):
img = Image.open(self.images[index]).convert('L') img = Image.open(self.images[index]).convert('L')
...@@ -99,10 +107,11 @@ class VOCSegmentation(VisionDataset): ...@@ -99,10 +107,11 @@ class VOCSegmentation(VisionDataset):
pim = target.load() pim = target.load()
for i in range(200): for i in range(200):
for j in range(200): for j in range(200):
pim[i, j] = 1 if pim[i, j] > 0 else 0 pim[i, j] = 255 if pim[i, j] > 0 else 0
# img, target = self.seq(image=np.array(img), segmentation_maps = np.array(target)) # img, target = self.seq(image=np.array(img), segmentation_maps = np.array(target))
# img = self.preprocess(img)
# target = self.preprocess(img)
if self.transforms is not None: if self.transforms is not None:
img, target = self.transforms(img, target) img, target = self.transforms(img, target)
......
import torch import torch
from torch.autograd import Function from torch.autograd import Function
class DiceCoeff(Function): class DiceCoeff(Function):
"""Dice coeff for individual examples""" """Dice coeff for individual examples"""
...@@ -10,22 +9,18 @@ class DiceCoeff(Function): ...@@ -10,22 +9,18 @@ class DiceCoeff(Function):
eps = 0.0001 eps = 0.0001
self.inter = torch.dot(input.view(-1), target.view(-1)) self.inter = torch.dot(input.view(-1), target.view(-1))
self.union = torch.sum(input) + torch.sum(target) + eps self.union = torch.sum(input) + torch.sum(target) + eps
t = (2 * self.inter.float() + eps) / self.union.float() t = (2 * self.inter.float() + eps) / self.union.float()
return t return t
# This function has only a single output, so it gets only one gradient # This function has only a single output, so it gets only one gradient
def backward(self, grad_output): def backward(self, grad_output):
input, target = self.saved_variables input, target = self.saved_variables
grad_input = grad_target = None grad_input = grad_target = None
if self.needs_input_grad[0]: if self.needs_input_grad[0]:
grad_input = grad_output * 2 * (target * self.union - self.inter) \ grad_input = grad_output * 2 * (target * self.union - self.inter) \
/ (self.union * self.union) / (self.union * self.union)
if self.needs_input_grad[1]: if self.needs_input_grad[1]:
grad_target = None grad_target = None
return grad_input, grad_target return grad_input, grad_target
...@@ -40,3 +35,13 @@ def dice_coeff(input, target): ...@@ -40,3 +35,13 @@ def dice_coeff(input, target):
s = s + DiceCoeff().forward(c[0], c[1]) s = s + DiceCoeff().forward(c[0], c[1])
return s / (i + 1) return s / (i + 1)
def dice_coef(pred, target):
smooth = 1.
num = pred.size(0)
m1 = pred.view(num, -1) # Flatten
m2 = target.view(num, -1) # Flatten
intersection = (m1 * m2).sum()
return (2. * intersection + smooth) / (m1.sum() + m2.sum() + smooth)
\ No newline at end of file
import torch import torch
import torch.nn.functional as F import torch.nn.functional as F
from tqdm import tqdm from tqdm import tqdm
from sklearn.metrics import jaccard_score
from utils.dice_loss import dice_coeff from utils.dice_loss import dice_coeff, dice_coef
from .metrics import eval_metrics
def eval_net(net, loader, device, n_val): def eval_net(net, loader, device, n_val):
...@@ -11,10 +13,7 @@ def eval_net(net, loader, device, n_val): ...@@ -11,10 +13,7 @@ def eval_net(net, loader, device, n_val):
tot = 0 tot = 0
with tqdm(total=n_val, desc='Validation round', unit='img', leave=False) as pbar: with tqdm(total=n_val, desc='Validation round', unit='img', leave=False) as pbar:
for batch in loader: for imgs,true_masks in loader:
imgs = batch['image']
true_masks = batch['mask']
imgs = imgs.to(device=device, dtype=torch.float32) imgs = imgs.to(device=device, dtype=torch.float32)
mask_type = torch.float32 if net.n_classes == 1 else torch.long mask_type = torch.float32 if net.n_classes == 1 else torch.long
true_masks = true_masks.to(device=device, dtype=mask_type) true_masks = true_masks.to(device=device, dtype=mask_type)
...@@ -26,7 +25,48 @@ def eval_net(net, loader, device, n_val): ...@@ -26,7 +25,48 @@ def eval_net(net, loader, device, n_val):
if net.n_classes > 1: if net.n_classes > 1:
tot += F.cross_entropy(pred.unsqueeze(dim=0), true_mask.unsqueeze(dim=0)).item() tot += F.cross_entropy(pred.unsqueeze(dim=0), true_mask.unsqueeze(dim=0)).item()
else: else:
tot += dice_coeff(pred, true_mask.squeeze(dim=1)).item() tot += dice_coef(pred, true_mask.squeeze(dim=1)).item()
pbar.update(imgs.shape[0]) pbar.update(imgs.shape[0])
return tot / n_val return tot / n_val
def eval_multi(net, loader, device, n_val):
net.eval()
overall_acc = 0
avg_per_class_acc = 0
avg_jacc = 0
avg_dice = 0
with tqdm(total = n_val, desc = 'Validation round', unit = 'img', leave = False) as pbar:
for imgs, true_masks in loader:
imgs = imgs.to(device = device, dtype = torch.float32)
mask_type = torch.float32 if net.n_classes == 1 else torch.long
true_masks = true_masks.to(device = device, dtype = mask_type)
pred_mask = net(imgs)
oac, apca, aj, ad = eval_metrics(true_masks, pred_mask, 1)
overall_acc += oac
avg_per_class_acc += apca
avg_jacc += aj
avg_dice += ad
pbar.update(imgs.shape[0])
return
def eval_jac(net, loader, device, n_val):
net.eval()
jac = 0
with tqdm(total = n_val, desc = 'Validation round', unit = 'img', leave = False) as pbar:
for imgs, true_masks in loader:
imgs = imgs.to(device = device, dtype = torch.float32)
mask_type = torch.float32 if net.n_classes == 1 else torch.long
true_masks = true_masks.to(device = device, dtype = mask_type)
pred_masks = net(imgs)
pred_masks = torch.round(pred_masks).detach().numpy()
true_masks = torch.round(true_masks).numpy()
jac += jaccard_score(true_masks.flatten(), pred_masks.flatten())
pbar.update(imgs.shape[0])
return jac/n_val
#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""Common image segmentation metrics.
"""
import torch
EPS = 1e-10
def nanmean(x):
"""Computes the arithmetic mean ignoring any NaNs."""
return torch.mean(x[x == x])
def _fast_hist(true, pred, num_classes):
mask = (true >= 0) & (true < num_classes)
hist = torch.bincount(num_classes * true[mask] + pred[mask], minlength = num_classes ** 2).reshape(num_classes,num_classes).float()
return hist
def overall_pixel_accuracy(hist):
"""Computes the total pixel accuracy.
The overall pixel accuracy provides an intuitive
approximation for the qualitative perception of the
label when it is viewed in its overall shape but not
its details.
Args:
hist: confusion matrix.
Returns:
overall_acc: the overall pixel accuracy.
"""
correct = torch.diag(hist).sum()
total = hist.sum()
overall_acc = correct / (total + EPS)
return overall_acc
def per_class_pixel_accuracy(hist):
"""Computes the average per-class pixel accuracy.
The per-class pixel accuracy is a more fine-grained
version of the overall pixel accuracy. A model could
score a relatively high overall pixel accuracy by
correctly predicting the dominant labels or areas
in the image whilst incorrectly predicting the
possibly more important/rare labels. Such a model
will score a low per-class pixel accuracy.
Args:
hist: confusion matrix.
Returns:
avg_per_class_acc: the average per-class pixel accuracy.
"""
correct_per_class = torch.diag(hist)
total_per_class = hist.sum(dim = 1)
per_class_acc = correct_per_class / (total_per_class + EPS)
avg_per_class_acc = nanmean(per_class_acc)
return avg_per_class_acc
def jaccard_index(hist):
"""Computes the Jaccard index, a.k.a the Intersection over Union (IoU).
Args:
hist: confusion matrix.
Returns:
avg_jacc: the average per-class jaccard index.
"""
A_inter_B = torch.diag(hist)
A = hist.sum(dim = 1)
B = hist.sum(dim = 0)
jaccard = A_inter_B / (A + B - A_inter_B + EPS)
avg_jacc = nanmean(jaccard)
return avg_jacc
def dice_coefficient(hist):
"""Computes the Sørensen–Dice coefficient, a.k.a the F1 score.
Args:
hist: confusion matrix.
Returns:
avg_dice: the average per-class dice coefficient.
"""
A_inter_B = torch.diag(hist)
A = hist.sum(dim = 1)
B = hist.sum(dim = 0)
dice = (2 * A_inter_B) / (A + B + EPS)
avg_dice = nanmean(dice)
return avg_dice
def eval_metrics(true, pred, num_classes):
"""Computes various segmentation metrics on 2D feature maps.
Args:
true: a tensor of shape [B, H, W] or [B, 1, H, W].
pred: a tensor of shape [B, H, W] or [B, 1, H, W].
num_classes: the number of classes to segment. This number
should be less than the ID of the ignored class.
Returns:
overall_acc: the overall pixel accuracy.
avg_per_class_acc: the average per-class pixel accuracy.
avg_jacc: the jaccard index.
avg_dice: the dice coefficient.
"""
hist = torch.zeros((num_classes, num_classes))
for t, p in zip(true, pred):
hist += _fast_hist(t.flatten(), p.flatten(), num_classes)
overall_acc = overall_pixel_accuracy(hist)
avg_per_class_acc = per_class_pixel_accuracy(hist)
avg_jacc = jaccard_index(hist)
avg_dice = dice_coefficient(hist)
return overall_acc, avg_per_class_acc, avg_jacc, avg_dice
class AverageMeter(object):
def __init__(self):
self.val = 0
self.avg = 0
self.sum = 0
self.count = 0
def update(self, val, n = 1):
self.val = val
self.sum += val * n
self.count += n
self.avg = self.sum / self.count
...@@ -23,4 +23,25 @@ def predict_img(net, full_img, device, out_threshold = 0.5): ...@@ -23,4 +23,25 @@ def predict_img(net, full_img, device, out_threshold = 0.5):
probs = tf(probs.cpu()) probs = tf(probs.cpu())
full_mask = probs.squeeze().cpu().numpy() full_mask = probs.squeeze().cpu().numpy()
return full_mask > out_threshold
def predict(net, full_img, device, out_threshold = 0.5):
net.eval()
img = torch.from_numpy(BasicDataset.preprocess(full_img))
img = img.unsqueeze(0)
img = img.to(device = device, dtype = torch.float32)
with torch.no_grad():
output = net(img)
# if net.n_classes > 1:
# probs = F.softmax(output, dim = 1)
# else:
# probs = torch.sigmoid(output)
probs = output.squeeze(0)
tf = transforms.Compose([transforms.ToPILImage(), transforms.Resize(full_img.size[1]), transforms.ToTensor()])
probs = tf(probs.cpu())
full_mask = probs.squeeze().cpu().numpy()
return full_mask > out_threshold return full_mask > out_threshold
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment