文档服务地址: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
from unet import UNet
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
......@@ -30,8 +30,8 @@ def step_1(net, args, device, list, position):
for fn in tqdm(list, position = position):
logging.info("\nPredicting image {} ...".format(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,
device = device)
#mask = predict_img(net = net, full_img = img, out_threshold = args.mask_threshold, device = device)
mask = predict(net = net, full_img = img, out_threshold = args.mask_threshold, device = device)
result = (mask * 255).astype(np.uint8)
#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
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 16ug 852nm 30mw 300mw tune 43.00 003
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 128ug 852nm 30mw 300mw tune 43.00 002
Step size0Dwell time50 K.p atcc 700603 12.16 Gentsmincin 8ug 40mw 400mw tune 43.08 003
Step size0Dwell time50 E.coil ATCC25922 PBb Tobramycin 0.5ug 852nm 30mw 300mw tune 43.02 002
Step size0Dwell time50 E.faecium atcc 29212 Amp 1ug 852nm 40mw 400mw tune 43.08 004
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 1ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 1ug 852nm 30mw 300mw tune 43.02 003
Step size0Dwell time50 E.coil D2O 852nm 30mw 300mw tune 43.02 004
Step size0Dwell time50 E.coil atcc 25922 12.16 D2O 852nm 40mw 400mw tune 43.08 001-
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 2ug 852nm 30mw 300mw tune 43.02 002
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 0.25ug 40mw 400mw tune 43.08 002
Step size0Dwell time50 P.a atcc27853 Gen 0.5ug 852nm 30mw 300mw tune 43.03 001
Step size0Dwell time50 S.a atcc 29213 1h d2o-2 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 P.a atcc27853 LB-11.29 852nm 30mw 300mw tune 43.06 001
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 16ug 852nm 30mw 300mw tune 43.00 003
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.125ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.125ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 4ug 852nm 30mw 300mw tune 43.02 001
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 16ug 852nm 30mw 300mw tune 43.00 002
Step size0Dwell time50 S.a atcc 29213 1h d2o-2 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 0.25ug 40mw 400mw tune 43.08 003
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 2ug 852nm 30mw 300mw tune 43.02 003
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 2ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 E.coil atcc 25922 12.12 TOB 0.25 852nm 40mw 400mw tune 43.11 003
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 32ug 40mw 400mw tune 43.08 004
Step size0Dwell time50 P.a atcc 27853 Ceft 4ug 852nm 30mw 300mw tune 43.03 001
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 1ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 1ug 852nm 30mw 300mw tune 43.02 002
Step size0Dwell time50 E.coil atcc25922 Amipicillin 8ug 852nm 40mw 400mw tune43.08 60x oil obj 002
Step size0Dwell time50 E.faecium atcc 29212 Amp 2ug 852nm 40mw 400mw tune 43.08 004
Step size0Dwell time50 K.p atcc 700603 12.16 Gentsmincin 8ug 40mw 400mw tune 43.08 002
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 32ug 40mw 400mw tune 43.08 004
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 128ug 852nm 30mw 300mw tune 43.00 003
Step size0Dwell time50 E.coil atcc25922 Gentamicin 1ug 852nm 30mw 300mw tune 43.04 004
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 16ug 852nm 30mw 300mw tune 43.00 002
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 128ug 852nm 30mw 300mw tune 43.00 001
Step size0Dwell time50 Clinical Sample K. p Tobramycin 16ug 852nm 30mw 300mw tune 43.00 002
Step size0Dwell time50 E.coil ATCC25922 PBb Tobramycin 0.5ug 852nm 30mw 300mw tune 43.02 001
Step size0Dwell time50 E.faecium atcc 29212 Ery 0.25ug 852nm 40mw 400mw tune 43.08 004
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 1ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 2ug 852nm 30mw 300mw tune 43.02 001
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 0.25ug 40mw 400mw tune 43.08 001
Step size0Dwell time50 E.faecium atcc 29212 Ampicillin D2O 852nm 40mw 400mw tune 43.08 005
Step size0Dwell time50 P.a atcc 27853 Ceft 2ug 852nm 30mw 300mw tune 43.03 001
Step size0Dwell time50 S.a atcc 29213 Eryth 0.03125ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.125ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 E.coil atcc25922 Imipenen 0.5ug 852nm 40mw 400mw tune43.08 60x oil obj 002
Step size0Dwell time50 E.coil atcc25922 Imipenen 0.5ug 852nm 40mw 400mw tune43.08 60x oil obj 003
Step size0Dwell time50 P.a atcc 27853 Ceft 1ug 852nm 30mw 300mw tune 43.03 001
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 16ug 852nm 30mw 300mw tune 43.00 001
Step size0Dwell time50 S.a atcc 29213 Eryth 0.03125ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 P.a overnight Tob 1ug 852nm 30mw 300mw tune 43.05 004
Step size0Dwell time50 S.a atcc 29213 1h d2o-2 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 P.a atcc27853 D2O-11.29 852nm 30mw 300mw tune 43.06 002
Step size0Dwell time50 P.a atcc 27853 Ceft 4ug 852nm 30mw 300mw tune 43.03 002
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 1ug 852nm 30mw 300mw tune 43.02 001
Step size0Dwell time50 E.coil atcc25922 Imipenen 0.25ug 852nm 40mw 400mw tune43.08 60x oil obj 001
Step size0Dwell time50 E.coil atcc25922 Amipicillin 8ug 852nm 40mw 400mw tune43.08 60x oil obj 001
Step size0Dwell time50 K.p atcc 700603 12.16 Gentsmincin 8ug 40mw 400mw tune 43.08 001
Step size0Dwell time50 P.a atcc27853 Imipenen D2O 852nm 30mw 300mw tune 43.02 001
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 16ug 852nm 30mw 300mw tune 43.00 001
Step size0Dwell time50 Clinical Sample K. p Tobramycin 16ug 852nm 30mw 300mw tune 43.00 003
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 32ug 40mw 400mw tune 43.08 003
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 64ug 40mw 400mw tune 43.08 001-1
Step size0Dwell time50 E.faecium atcc 29212 Amp 2ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 E.faecium atcc 29212 Ery 0.25ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 E.faecium atcc 29212 Amp 1ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 32ug 40mw 400mw tune 43.08 003
Step size0Dwell time50 E.coil atcc 25922 12.12 TOB 0.25 852nm 40mw 400mw tune 43.11 004
Step size0Dwell time50 E.coil D2O 852nm 30mw 300mw tune 43.02 002
Step size0Dwell time50 E.coil atcc25922 Imipenen 0.25ug 852nm 40mw 400mw tune43.08 60x oil obj 011
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 1ug 852nm 40mw 400mw tune 43.08 004
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 2ug 852nm 30mw 300mw tune 43.02 004
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 0.25ug 40mw 400mw tune 43.08 004
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 2ug 852nm 40mw 400mw tune 43.08 005
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 16ug 40mw 400mw tune 43.08 001
Step size0Dwell time50 P.a overnight Tob 2ug 852nm 30mw 300mw tune 43.05 001
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.25ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 S.a atcc 29213 1h d2o-2 852nm 40mw 400mw tune 43.08 004
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 16ug 852nm 30mw 300mw tune 43.00 004
Step size0Dwell time50 E.coil atcc25922 Amipicillin 16ug 852nm 40mw 400mw tune43.08 60x oil obj 001
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.0625ug 852nm 40mw 400mw tune 43.08 005
Step size0Dwell time50 E.coil atcc25922 Imipenen 0.25ug 852nm 40mw 400mw tune43.08 60x oil obj 004
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 1ug 852nm 30mw 300mw tune 43.02 004
Step size0Dwell time50 E.coil D2O 852nm 30mw 300mw tune 43.02 003
Step size0Dwell time50 E.faecium atcc 29212 Amp 1ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 E.faecium atcc 29212 Amp 2ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 E.coil ATCC25922 PBb Tobramycin 0.5ug 852nm 30mw 300mw tune 43.02 005
Step size0Dwell time50 K.p atcc700603 Imipenen 0.25ug 852nm 40mw 400mw tune43.08 002
Step size0Dwell time50 E.coil atcc25922 Gentamicin 2ug 852nm 30mw 300mw tune 43.04 003
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 16ug 852nm 30mw 300mw tune 43.00 004
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 32ug 40mw 400mw tune 43.08 002
Step size0Dwell time50 E.coil atcc25922 Gentamicin 1ug 852nm 30mw 300mw tune 43.04 002
Step size0Dwell time50 P.a atcc27853 Gen 4ug 852nm 30mw 300mw tune 43.03 002
Step size0Dwell time50 P.a overnight Tob 0.5ug 852nm 30mw 300mw tune 43.05 002
Step size0Dwell time50 Clinical Sample K. p Tobramycin 16ug 852nm 30mw 300mw tune 43.00 004
Step size0Dwell time50 E.faecium atcc 29212 Ery 0.25ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 P.a atcc27853 Gen 2ug 852nm 30mw 300mw tune 43.03 002
Step size0Dwell time50 E.coil atcc25922 Amipicillin 8ug 852nm 40mw 400mw tune43.08 60x oil obj 006
Step size0Dwell time50 E.faecium atcc 29212 Amp 1ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 E.coil D2O 852nm 30mw 300mw tune 43.02 001
Step size0Dwell time50 E.faecium atcc 29212 Ampicillin D2O 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 E.coil atcc25922 Amipicillin 16ug 852nm 40mw 400mw tune43.08 60x oil obj 003
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 2ug 852nm 40mw 400mw tune 43.08 006
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 16ug 40mw 400mw tune 43.08 002
Step size0Dwell time50 P.a overnight Tob 2ug 852nm 30mw 300mw tune 43.05 002
Step size0Dwell time50 E.coil atcc25922 Imipenen 0.5ug 852nm 40mw 400mw tune43.08 60x oil obj 004
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.25ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 16ug 40mw 400mw tune 43.08 003
Step size0Dwell time50 E.faecium atcc 29212 Ampicillin D2O 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.0625ug 852nm 40mw 400mw tune 43.08 006
Step size0Dwell time50 P.a overnight Tob 4ug 852nm 30mw 300mw tune 43.05 001
Step size0Dwell time50 E.coil atcc 25922 12.12 TOB 0.25 852nm 40mw 400mw tune 43.11 006
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 32ug 40mw 400mw tune 43.08 001
Step size0Dwell time50 P.a atcc27853 Gen 1ug 852nm 30mw 300mw tune 43.03 002
Step size0Dwell time50 P.a overnight Tob 0.25ug 852nm 30mw 300mw tune 43.05 003
Step size0Dwell time50 E.faecium atcc 29212 Lb 852nm 40mw 400mw tune 43.08 0077
Step size0Dwell time50 E.faecium atcc 29212 Amp 2ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 E.faecium atcc 29212 Ery 0.25ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 K.p atcc700603 Imipenen 0.25ug 852nm 40mw 400mw tune43.08 001
Step size0Dwell time50 E.coil atcc25922 Gentamicin 1ug 852nm 30mw 300mw tune 43.04 001
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 32ug 40mw 400mw tune 43.08 001
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 256ug 852nm 30mw 300mw tune 43.00 004
Step size0Dwell time50 S.a atcc 29213 Linezolid 16ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 4ug 40mw 400mw tune 43.08 004
Step size0Dwell time50 P.a atcc27853 Amipicillin 16ug 852nm 30mw 300mw tune 43.03 001
Step size0Dwell time50 E.coil atcc 25922 12.16 D2O 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 0.125ug 852nm 40mw 400mw tune 43.08 006
Step size0Dwell time50 E.coil ATCC25922 PBb Tobramycin 0.25ug 852nm 30mw 300mw tune 43.02 004
Step size0Dwell time50 P.a 1h D2O 852nm 30mw 300mw tune 43.03 004
Step size0Dwell time50 E.coil atcc 25922 12.16 lb 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 E.faecium atcc 29212 Amp 0.25ug 852nm 40mw 400mw tune 43.08 002
191128-Step size0Dwell time50 P.a overnight LB 852nm 30mw 300mw tune 43.05 001
Step size0Dwell time50 P.a atcc27853 Levofloxacin-11.29 0.5ug 852nm 30mw 300mw tune 43.06 003
Step size0Dwell time50 E.faecium atcc 29212 Ery 2ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 E.coil atcc25922 1h D2O 852nm 40mw 400mw tune43.08 60x oil obj 003
Step size0Dwell time50 P.a atcc27853 Gen 0.25ug 852nm 30mw 300mw tune 43.03 001
Step size0Dwell time50 E.faecium atcc 29212 Ery 1ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 S.a atcc 29213 Linezolid 1ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 0.50.5ug 40mw 400mw tune 43.08 001
Step size0Dwell time50 E.faecium atcc 29212 Ery 1ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 E.faecium atcc 29212 Ery 2ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 P.a atcc27853 Levofloxacin-11.29 0.5ug 852nm 30mw 300mw tune 43.06 002
Step size0Dwell time50 E.faecium atcc 29212 Amp 0.25ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 S.a atcc 29213 Linezolid 4ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 E.faecium atcc 29212 Ery 4ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 8ug 852nm 30mw 300mw tune 43.00 001
Step size0Dwell time50 S.a atcc 29213 Linezolid 16ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 256ug 852nm 30mw 300mw tune 43.00 005
Step size0Dwell time50 E.coil atcc25922 Gentamicin 0.5ug 852nm 30mw 300mw tune 43.04 006
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 8ug 852nm 30mw 300mw tune 43.00 003
Step size0Dwell time50 P.a atcc27853 Amipicillin 16ug 852nm 30mw 300mw tune 43.03 002
Step size0Dwell time50 Clinical Sample K. p D2O 0ug 852nm 30mw 300mw tune 43.00 004
Step size0Dwell time50 E.coil atcc 25922 12.16 D2O 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 S.a atcc 29213 Linezolid 0.5ug 852nm 40mw 400mw tune 43.08 004
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 0.125ug 852nm 40mw 400mw tune 43.08 005
Step size0Dwell time50 E.faecium atcc 29212 Amp 0.25ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 E.faecium atcc 29212 Ery 2ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 E.coil atcc25922 Ceftazidime 4ug 852nm 40mw 400mw tune43.08 60x oil obj 004
Step size0Dwell time50 Clinical Sample K. p Tobramycin 4ug 852nm 30mw 300mw tune 43.00 003
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 0.50.5ug 40mw 400mw tune 43.08 003
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 0.50.5ug 40mw 400mw tune 43.08 002
Step size0Dwell time50 E.faecium atcc 29212 Ery 1ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 E.coil atcc25922 Ceftazidime 4ug 852nm 40mw 400mw tune43.08 60x oil obj 005
Step size0Dwell time50 Clinical Sample K. p Tobramycin 4ug 852nm 30mw 300mw tune 43.00 002
Step size0Dwell time50 S.a atcc 29213 Linezolid 4ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 E.faecium atcc 29212 Ery 4ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 Clinical Sample K. p Tobramycin 64ug 852nm 30mw 300mw tune 43.00 003_over-exposure
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 0.125ug 852nm 40mw 400mw tune 43.08 004
Step size0Dwell time50 S.a atcc 29213 Linezolid 0.5ug 852nm 40mw 400mw tune 43.08 005
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 1ug 40mw 400mw tune 43.08 004
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 8ug 852nm 30mw 300mw tune 43.00 002
Step size0Dwell time50 S.a atcc 29213 Linezolid 16ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 E.coil atcc25922 Gentamicin 0.5ug 852nm 30mw 300mw tune 43.04 003
Step size0Dwell time50 Clinical Sample K. p D2O 0ug 852nm 30mw 300mw tune 43.00 001
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 4ug 40mw 400mw tune 43.08 002
Step size0Dwell time50 S.a atcc 29213 Linezolid 0.5ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 E.coil ATCC25922 PBb Tobramycin 0.25ug 852nm 30mw 300mw tune 43.02 002
Step size0Dwell time30 P.a atcc27853 D2O OVERNIGHT 852nm 30mw 300mw tune 43.01 005
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 2ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 P.a atcc27853 Imipenen LB 852nm 30mw 300mw tune 43.02 007
Step size0Dwell time50 S.a atcc 29213 Linezolid 1ug 852nm 40mw 400mw tune 43.08 005
Step size0Dwell time50 S.a atcc 29213 Linezolid 1ug 852nm 40mw 400mw tune 43.08 004
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 4ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 S.a atcc 29213 Linezolid 2ug 852nm 40mw 400mw tune 43.08 005
Step size0Dwell time50 Clinical Sample K. p LB 0ug 852nm 30mw 300mw tune 43.00 002
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 1ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 E.coil ATCC25922 PBb Tobramycin 0.25ug 852nm 30mw 300mw tune 43.02 003
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 4ug 40mw 400mw tune 43.08 003
Step size0Dwell time50 E.coil atcc25922 1h D2O 852nm 30mw 300mw tune43.08 60x oil obj 002
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 256ug 852nm 30mw 300mw tune 43.00 003
Step size0Dwell time50 S.a atcc 29213 Linezolid 16ug 852nm 40mw 400mw tune 43.08 004
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 64ug 852nm 30mw 300mw tune 43.00 003_over-exposure
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 256ug 852nm 30mw 300mw tune 43.00 001
Step size0Dwell time50 P.a 1h d2o 852nm 30mw 300mw tune 43.06 002
Step size0Dwell time50 Clinical Sample K. p D2O 0ug 852nm 30mw 300mw tune 43.00 002
Step size0Dwell time50 P.a atcc27853 Levofloxacin-11.29 8ug 852nm 30mw 300mw tune 43.06 001
Step size0Dwell time50 S.a atcc 29213 Linezolid 0.5ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 E.coil atcc 25922 12.16 D2O 852nm 40mw 400mw tune 43.08 004
Step size0Dwell time50 E.coil ATCC25922 PBb Tobramycin 0.25ug 852nm 30mw 300mw tune 43.02 001
Step size0Dwell time50 S.a atcc 29213 Linezolid 4ug 852nm 40mw 400mw tune 43.08 005
Step size0Dwell time50 E.faecium atcc 29212 Ery 0.5ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 2ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 E.coil atcc25922 Ceftazidime 4ug 852nm 40mw 400mw tune43.08 60x oil obj 002
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 0.50.5ug 40mw 400mw tune 43.08 004
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 4ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 E.coil atcc25922 Ceftazidime 4ug 852nm 40mw 400mw tune43.08 60x oil obj 003
Step size0Dwell time50 Clinical Sample K. p Tobramycin 4ug 852nm 30mw 300mw tune 43.00 004
Step size0Dwell time50 P.a atcc27853 LB-12.2 852nm 30mw 300mw tune 43.01 002
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 2ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 Clinical Sample K. p Tobramycin 64ug 852nm 30mw 300mw tune 43.00 002_over-exposure
Step size0Dwell time50 E.faecium atcc 29212 Ery 0.5ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 1ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 S.a atcc 29213 Linezolid 4ug 852nm 40mw 400mw tune 43.08 004
Step size0Dwell time50 E.coil atcc25922 1h D2O 852nm 30mw 300mw tune43.08 60x oil obj 001
Step size0Dwell time50 Clinical Sample K. p D2O 0ug 852nm 30mw 300mw tune 43.00 003
Step size0Dwell time50 E.faecium atcc 29212 Amp 0.5ug 852nm 40mw 400mw tune 43.08 005
Step size0Dwell time50 K.p atcc 700603 12.16 Tobramycin 2ug 40mw 400mw tune 43.08 001
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 8ug 40mw 400mw tune 43.08 003
Step size0Dwell time50 E.coil atcc25922 Ceftazidime 0.25ug 852nm 40mw 400mw tune43.08 60x oil obj 003
Step size0Dwell time50 S.a atcc 29213 Eryth 0.25ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 Clinical Sample K. p Tobramycin 32ug 852nm 30mw 300mw tune 43.00 002_over-exposure
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 2ug 40mw 400mw tune 43.08 003
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 0.25ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 Clinical Sample K. p Tobramycin 4ug 852nm 30mw 300mw tune 43.00 001_over-exposure
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 8ug40mw 400mw tune 43.08 004
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 16ug40mw 400mw tune 43.08 001
Step size0Dwell time50 K.p atcc 700603 12.16 Gentsmincin 16ug 40mw 400mw tune 43.08 003
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.5ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 128ug 852nm 30mw 300mw tune 43.00 001
Step size0Dwell time50 K.p atcc700603 Imipenen 0.5ug 852nm 40mw 400mw tune43.08 003
Step size0Dwell time50 E.coil atcc25922 Ceftazidime 2ug 852nm 40mw 400mw tune43.08 60x oil obj 001
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.0625 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.25ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 0.5ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 0.25ug 852nm 40mw 400mw tune 43.08 005
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.125ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.125ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 0.25ug 852nm 40mw 400mw tune 43.08 004
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 0.5ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 K.p atcc700603 Imipenen 0.5ug 852nm 40mw 400mw tune43.08 002
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.5ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 P.a atcc 27853 Ceft 0.5ug 852nm 30mw 300mw tune 43.03 002
191128-Step size0Dwell time50 P.a overnight Gen 4ug 852nm 30mw 300mw tune 43.05 001
Step size0Dwell time50 K.p atcc 700603 12.16 Gentsmincin 16ug 40mw 400mw tune 43.08 002
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 0.25ug 852nm 30mw 300mw tune 43.02 001
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 2ug 40mw 400mw tune 43.08 002
Step size0Dwell time50 P.a atcc 29213 Gen-r 2ug 852nm 30mw 300mw tune43.05 010
Step size0Dwell time50 E.faecium atcc 29212 Amp 16ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 E.coil atcc25922 Ceftazidime 0.25ug 852nm 40mw 400mw tune43.08 60x oil obj 002
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 8ug 40mw 400mw tune 43.08 002
Step size0Dwell time50 E.faecium atcc 29212 Amp 0.5ug 852nm 40mw 400mw tune 43.08 004
Step size0Dwell time50 P.a overnight LB 852nm 30mw 300mw tune 43.05 001
Step size0Dwell time50 K.p atcc 700603 12.16 Tobramycin 2ug 40mw 400mw tune 43.08 002
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 0.25ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 16ug40mw 400mw tune 43.08 002
Step size0Dwell time50 K.p atcc 700603 12.16 Gentsmincin 2ug 40mw 400mw tune 43.08 002
Step size0Dwell time50 P.a atcc 29213 Gen 0.25ug 852nm 30mw 300mw tune43.05 003
Step size0Dwell time50 S.a atcc 29213 Vancomycin D2O 852nm 40mw 400mw tune 43.08 0088
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 128ug 852nm 30mw 300mw tune 43.00 002
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.25ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 E.coil atcc25922 Ceftazidime 2ug 852nm 40mw 400mw tune43.08 60x oil obj 002
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.125ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 0.5ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 P.a atcc27853 Amipicillin 64ug 852nm 30mw 300mw tune 43.03 002
Step size0Dwell time50 E.coil atcc25922 Ceftazidime 2ug 852nm 40mw 400mw tune43.08 60x oil obj 003
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.25ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 S.a atcc 29213 Vancomycin D2O 852nm 40mw 400mw tune 43.08 0089
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 128ug 852nm 30mw 300mw tune 43.00 003
Step size0Dwell time50 K.p atcc700603 Imipenen 0.5ug 852nm 40mw 400mw tune43.08 001
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.5ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 16ug40mw 400mw tune 43.08 003
Step size0Dwell time50 K.p atcc 700603 12.16 Gentsmincin 2ug 40mw 400mw tune 43.08 003
Step size0Dwell time50 K.p atcc 700603 12.16 Gentsmincin 16ug 40mw 400mw tune 43.08 001
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 0.25ug 852nm 30mw 300mw tune 43.02 002
Step size0Dwell time50 S.a atcc 29213 Eryth 0.25ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 E.coil atcc25922 Amipicillin 2ug 852nm 40mw 400mw tune43.08 60x oil obj 002
Step size0Dwell time50 K.p atcc 700603 12.16 Tobramycin 2ug 40mw 400mw tune 43.08 003
Step size0Dwell time50 E.coil atcc25922 Ceftazidime 0.25ug 852nm 40mw 400mw tune43.08 60x oil obj 001
Step size0Dwell time10 E.coil atcc25922 1h d2o 852nm 30mw 300mw tune 43.04 0088
Step size0Dwell time50 E.coil atcc25922 Ceftazidime 0.25ug 852nm 40mw 400mw tune43.08 60x oil obj 005
Step size0Dwell time50 S.a atcc 29213 Eryth 0.0625ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 E.faecium atcc 29212 Amp 16ug 852nm 40mw 400mw tune 43.08 004
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.0625ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 K.p atcc 700603 12.16 D2O 40mw 400mw tune 43.08 0077
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 8ug40mw 400mw tune 43.08 002
Step size0Dwell time50 Clinical Sample K. p Tobramycin 128ug 852nm 30mw 300mw tune 43.00 001
Step size0Dwell time50 S.a atcc 29213 Eryth 1ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.125ug 852nm 40mw 400mw tune 43.08 004
Step size0Dwell time50 E.coil atcc25922 Amipicillin 1ug 852nm 40mw 400mw tune43.08 60x oil obj 001
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.0625 852nm 40mw 400mw tune 43.08 004
Step size0Dwell time50 S.a atcc 29213 Eryth 2ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.125ug 852nm 40mw 400mw tune 43.08 005
Step size0Dwell time50 P.a atcc27853 Imipenen 0.5ug 852nm 30mw 300mw tune 43.06 003
191128-Step size0Dwell time50 P.a overnight d2o 852nm 30mw 300mw tune 43.05 00191128-5
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.5ug 852nm 40mw 400mw tune 43.08 004
Step size0Dwell time50 P.a atcc 27853 Ceft D2O that day cultured 852nm 30mw 300mw tune 43.03 001
Step size0Dwell time50 P.a atcc 29213 Gen 1ug 852nm 30mw 300mw tune43.05 001-1
Step size0Dwell time50 E.faecium atcc 29212 Amp 8ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 8ug40mw 400mw tune 43.08 003
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.0625ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 S.a atcc 29213 Eryth 0.0625ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 E.faecium atcc 29212 Amp 0.5ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 K.p atcc 700603 12.16 Tobramycin 2ug 40mw 400mw tune 43.08 004
Step size0Dwell time50 E.coil atcc25922 Ceftazidime 0.25ug 852nm 40mw 400mw tune43.08 60x oil obj 006
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 8ug40mw 400mw tune 43.08 001
Step size0Dwell time50 K.p atcc 700603 12.16 Gentsmincin 2ug 40mw 400mw tune 43.08 004
Step size0Dwell time50 E.faecium atcc 29212 Amp 8ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 Clinical Sample K. p Tobramycin 128ug 852nm 30mw 300mw tune 43.00 002
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 128ug 852nm 30mw 300mw tune 43.00 004
Step size0Dwell time50 S.a atcc 29213 Eryth 1ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 0.25ug 852nm 40mw 400mw tune 43.08 003-1
Step size0Dwell time50 E.coil atcc25922 Amipicillin 1ug 852nm 40mw 400mw tune43.08 60x oil obj 002
Step size0Dwell time50 S.a atcc 29213 Eryth 2ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.25ug 852nm 40mw 400mw tune 43.08 004
Step size0Dwell time50 S.a atcc 29213 Eryth 2ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 E.coil atcc25922 Amipicillin 1ug 852nm 40mw 400mw tune43.08 60x oil obj 003
Step size0Dwell time50 E.coil atcc 25922 12.16 Tob 0.25ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 S.a atcc 29213 Eryth 1ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 Clinical Sample K. p Tobramycin 128ug 852nm 30mw 300mw tune 43.00 003
Step size0Dwell time50 E.faecium atcc 29212 Amp 8ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 P.a atcc27853 Amipicillin 32ug 852nm 30mw 300mw tune 43.03 001
Step size0Dwell time50 S.a atcc 29213 Ampicillin 0.0625ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 E.coil atcc25922 Amipicillin 2ug 852nm 40mw 400mw tune43.08 60x oil obj 004
Step size0Dwell time50 E.faecium atcc 29212 Amp 0.5ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 128ug40mw 400mw tune 43.08 002
Step size0Dwell time50 K.p atcc700603 Imipenen 2ug 852nm 40mw 400mw tune43.08 004
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 64ug 852nm 30mw 300mw tune 43.00 002
Step size0Dwell time50 E.coil ATCC25922 PBb Tobramycin 1ug 852nm 30mw 300mw tune 43.02 002
Step size0Dwell time50 S.a atcc 29213 Linezolid 8ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 1ug 40mw 400mw tune 43.08 005
Step size0Dwell time50 E.faecium atcc 29212 Ery 8ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 S.a atcc 29213 Eryth 0.125ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 P.a 1h d2o 852nm 30mw 300mw tune 43.05 003
Step size0Dwell time50 S.a atcc 29213 Ampicillin 2ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 0.5ug 852nm 30mw 300mw tune 43.02 004
Step size0Dwell time50 Clinical Sample K. p Tobramycin 8ug 852nm 30mw 300mw tune 43.00 001
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 0.0625ug 852nm 40mw 400mw tune 43.08 004
Step size0Dwell time10 E.coil atcc25922 Gentamicin 0.5ug 852nm 30mw 300mw tune 43.04 002
Step size0Dwell time50 S.a atcc 29213 Eryth 0.5ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 4ug 40mw 400mw tune 43.08 006
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 64ug 852nm 30mw 300mw tune 43.00 002
Step size0Dwell time50 E.coil ATCC25922 LB 852nm 30mw 300mw tune 43.02 001
Step size0Dwell time50 K.p atcc 700603 12.16 Tobramycin 4ug 40mw 400mw tune 43.08 004
Step size0Dwell time50 K.p atcc 700603 12.16 D2O 40mw 400mw tune 43.08 001
Step size0Dwell time50 Clinical Sample K. p Tobramycin 64ug 852nm 30mw 300mw tune 43.00 001
Step size0Dwell time50 Clinical Sample K. p Tobramycin 32ug 852nm 30mw 300mw tune 43.00 004
Step size0Dwell time50 E.coil atcc25922 Imipenen 2ug 852nm 40mw 400mw tune43.08 60x oil obj 003
Step size0Dwell time50 E.coil atcc 25922 12.16 D2O 852nm 40mw 400mw tune 43.08 003-
Step size0Dwell time50 P.a atcc27853 Levofloxacin-11.29 4ug 852nm 30mw 300mw tune 43.06 004
Step size0Dwell time50 S.a atcc 29213 Ampicillin 1ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 E.coil atcc25922 Imipenen 1ug 852nm 40mw 400mw tune43.08 60x oil obj 004
Step size0Dwell time50 S.a atcc 29213 Eryth 0.125ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 64ug 852nm 30mw 300mw tune 43.00 003
Step size0Dwell time50 S.a atcc 29213 Ampicillin 4ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 128ug40mw 400mw tune 43.08 003
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 128ug40mw 400mw tune 43.08 001
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 64ug 852nm 30mw 300mw tune 43.00 001
Step size0Dwell time50 S.a atcc 29213 Linezolid 8ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 K.p atcc 700603 12.16 Tobramycin 16ug 40mw 400mw tune 43.08 004
Step size0Dwell time50 E.coil ATCC25922 PBb Tobramycin 1ug 852nm 30mw 300mw tune 43.02 001
Step size0Dwell time50 S.a atcc 29213 Vancomycin LB 852nm 40mw 400mw tune 43.08 0089
Step size0Dwell time50 E.faecium atcc 29212 Ery 8ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 S.a atcc 29213 Eryth 0.125ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 K.p atcc700603 Imipenen 4ug 852nm 40mw 400mw tune43.08 005
Step size0Dwell time50 S.a atcc 29213 Ampicillin 2ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 32ug 852nm 30mw 300mw tune 43.00 004
Step size0Dwell time50 E.coil atcc25922 Ceftazime 1ug 852nm 40mw 400mw tune43.08 60x oil obj 004
Step size0Dwell time50 S.a atcc 29213 Ampicillin 1ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time10 E.coil atcc25922 Gentamicin 0.5ug 852nm 30mw 300mw tune 43.04 001
Step size0Dwell time50 Clinical Sample K. p Tobramycin 8ug 852nm 30mw 300mw tune 43.00 002
Step size0Dwell time50 E.coil atcc25922 Imipenen 1ug 852nm 40mw 400mw tune43.08 60x oil obj 006
Step size0Dwell time50 S.a atcc 29213 Eryth 0.5ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 E.coil atcc25922 Imipenen 0.25ug 852nm 40mw 400mw tune43.08 60x oil obj 009
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 32ug 852nm 30mw 300mw tune 43.00 004
Step size0Dwell time50 E.coil atcc25922 Gentamicin 0.25ug 852nm 30mw 300mw tune 43.04 003
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 64ug 852nm 30mw 300mw tune 43.00 001
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 512ug 852nm 30mw 300mw tune 43.00 004
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 256ug 852nm 30mw 300mw tune 43.00 004
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 64ug 40mw 400mw tune 43.08 004
Step size0Dwell time50 E.coil ATCC25922 LB 852nm 30mw 300mw tune 43.02 002
Step size0Dwell time50 K.p atcc 700603 12.16 D2O 40mw 400mw tune 43.08 003
Step size0Dwell time50 S.a atcc 29213 Linezolid 0.25ug 852nm 40mw 400mw tune 43.08 005
Step size0Dwell time50 S.a atcc 29213 Linezolid 0.25ug 852nm 40mw 400mw tune 43.08 004
Step size0Dwell time50 K.p atcc 700603 12.16 D2O 40mw 400mw tune 43.08 002
Step size0Dwell time50 E.coil ATCC25922 LB 852nm 30mw 300mw tune 43.02 003
Step size0Dwell time50 E.coil atcc25922 Gentamicin 0.25ug 852nm 30mw 300mw tune 43.04 002
Step size0Dwell time50 E.coil atcc25922 Imipenen 1ug 852nm 40mw 400mw tune43.08 60x oil obj 007
Step size0Dwell time50 S.a atcc 29213 Ampicillin 1ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 Clinical Sample K. p Tobramycin 8ug 852nm 30mw 300mw tune 43.00 003
Step size0Dwell time50 P.a atcc 29213 Gen 0.5ug 852nm 30mw 300mw tune43.05 001
Step size0Dwell time50 S.a atcc 29213 Ampicillin 2ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 E.faecium atcc 29212 Ery 8ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 S.a atcc 29213 Linezolid 8ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 S.a atcc 29213 Ampicillin 4ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 K.p atcc700603 Imipenen 2ug 852nm 40mw 400mw tune43.08 002
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 64ug 852nm 30mw 300mw tune 43.00 004
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 128ug40mw 400mw tune 43.08 004
Step size0Dwell time50 K.p atcc700603 Imipenen 1ug 852nm 40mw 400mw tune43.08 003
Step size0Dwell time50 E.coil ATCC25922 PBb Tobramycin 1ug 852nm 30mw 300mw tune 43.02 004
Step size0Dwell time50 K.p atcc 700603 12.16 Tobramycin 32ug 40mw 400mw tune 43.08 003
Step size0Dwell time50 K.p atcc 700603 12.16 Gentsmincin 4ug 40mw 400mw tune 43.08 002
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 0.0625ug 852nm 40mw 400mw tune 43.08 002
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 32ug 852nm 30mw 300mw tune 43.00 001
Step size0Dwell time50 E.coil atcc25922 Ceftazime 1ug 852nm 40mw 400mw tune43.08 60x oil obj 001
Step size0Dwell time50 E.coil atcc25922 Imipenen 2ug 852nm 40mw 400mw tune43.08 60x oil obj 004
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 32ug 852nm 30mw 300mw tune 43.00 001
Step size0Dwell time50 Clinical Sample K. p Tobramycin 32ug 852nm 30mw 300mw tune 43.00 003
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.5ug 852nm 40mw 400mw tune 43.08 0089
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 256ug 852nm 30mw 300mw tune 43.00 001
Step size0Dwell time50 K.p atcc 700603 12.16 Ampicillin 64ug 40mw 400mw tune 43.08 001
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.25ug 852nm 40mw 400mw tune 43.08 0089
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 64ug 852nm 30mw 300mw tune 43.00 004
Step size0Dwell time50 K.p atcc 700603 12.16 Tobramycin 4ug 40mw 400mw tune 43.08 002
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 0.5ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 K.p atcc 700603 12.16 Tobramycin 4ug 40mw 400mw tune 43.08 003
Step size0Dwell time50 S.a atcc 29213 Linezolid 0.25ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.25ug 852nm 40mw 400mw tune 43.08 0088
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 4ug 40mw 400mw tune 43.08 001
Step size0Dwell time50 E.coil atcc 25922 12.16 levo 0.5ug 852nm 40mw 400mw tune 43.08 0088
Step size0Dwell time50 Clinical Sample K. p Tobramycin 32ug 852nm 30mw 300mw tune 43.00 002
Step size0Dwell time50 P.a atcc27853 Levofloxacin-11.29 4ug 852nm 30mw 300mw tune 43.06 002
Step size0Dwell time50 E.coil atcc25922 Imipenen 1ug 852nm 40mw 400mw tune43.08 60x oil obj 002
Step size0Dwell time50 P.a atcc27853 Amipicillin 128ug 852nm 30mw 300mw tune 43.03 001
Step size0Dwell time50 K.p atcc 700603 12.16 Gentsmincin 4ug 40mw 400mw tune 43.08 003
Step size0Dwell time50 E.coil ATCC25922 PBb Levofloxacin 0.5ug 852nm 30mw 300mw tune 43.02 003
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 0.0625ug 852nm 40mw 400mw tune 43.08 003
Step size0Dwell time50 K.p atcc 700603 12.16 Tobramycin 32ug 40mw 400mw tune 43.08 002
Step size0Dwell time50 K.p atcc700603 Imipenen 4ug 852nm 40mw 400mw tune43.08 001
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 1ug 40mw 400mw tune 43.08 002
Step size0Dwell time50 K.p atcc700603 Imipenen 1ug 852nm 40mw 400mw tune43.08 002
Step size0Dwell time50 K.p atcc700603 Imipenen 2ug 852nm 40mw 400mw tune43.08 003
Step size0Dwell time50 K.p atcc700603 Imipenen 2ug 852nm 40mw 400mw tune43.08 001
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 512ug 852nm 30mw 300mw tune 43.00 001_over-expousre
Step size0Dwell time50 E.faecium atcc 29212 Ery 8ug 852nm 40mw 400mw tune 43.08 004
Step size0Dwell time50 S.a atcc 29213 Linezolid 8ug 852nm 40mw 400mw tune 43.08 004
Step size0Dwell time50 P.a atcc27853 D2O-12.2 852nm 30mw 300mw tune 43.01 001
Step size0Dwell time50 S.a atcc 29213 Ampicillin 2ug 852nm 40mw 400mw tune 43.08 004
Step size0Dwell time50 K.p atcc 700603 12.16 Ceftazidime 64ug 40mw 400mw tune 43.08 002
Step size0Dwell time50 S.a atcc 29213 Levofloxacin 0.0625ug 852nm 40mw 400mw tune 43.08 001
Step size0Dwell time50 K.p atcc 700603 12.16 Gentsmincin 4ug 40mw 400mw tune 43.08 001
Step size0Dwell time50 Clinical Sample K. p Tobramycin 8ug 852nm 30mw 300mw tune 43.00 004
Step size0Dwell time50 Clinical Sample K. p Ampicillcin 32ug 852nm 30mw 300mw tune 43.00 002
Step size0Dwell time50 E.coil atcc25922 Ceftazime 1ug 852nm 40mw 400mw tune43.08 60x oil obj 002
Step size0Dwell time50 K.p atcc 700603 12.16 LB 40mw 400mw tune 43.08 003
Step size0Dwell time50 S.a atcc 29213 Eryth 0.5ug 852nm 40mw 400mw tune 43.08 004
Step size0Dwell time50 E.coil atcc 25922 12.16 D2O 852nm 40mw 400mw tune 43.08 002-
Step size0Dwell time50 Clinical Sample K. p Ceftazidime 32ug 852nm 30mw 300mw tune 43.00 002
Step size0Dwell time50 K.p atcc 700603 12.16 Levofloxacin 4ug 40mw 400mw tune 43.08 003
63
189
77
162
176
88
348
360
406
412
374
228
214
200
201
215
229
413
375
361
407
349
177
89
163
188
76
62
74
60
48
149
175
161
388
439
377
411
405
363
559
203
217
216
202
558
404
362
376
410
438
389
160
174
148
49
61
75
59
71
65
170
164
158
399
414
372
366
400
428
560
206
212
548
549
213
561
207
429
367
401
415
373
398
159
165
171
64
70
58
8
198
66
72
167
99
173
403
365
371
417
359
211
205
563
239
238
204
562
210
358
370
416
402
364
172
166
98
73
199
67
9
14
28
129
101
115
459
465
303
317
471
288
539
511
277
263
505
262
504
510
276
538
289
316
470
464
302
458
114
100
128
29
15
17
116
102
499
328
472
314
300
466
248
506
260
274
512
275
513
507
261
249
301
467
473
315
329
498
103
117
16
12
113
107
488
311
477
463
305
339
265
503
517
271
259
258
516
270
264
502
338
462
304
310
476
489
106
112
13
39
11
104
110
138
306
460
474
312
448
299
272
514
500
266
528
529
501
267
273
515
298
449
475
313
307
461
139
111
105
10
38
21
35
108
120
134
487
493
478
444
322
336
450
295
281
518
530
256
242
524
243
525
531
257
519
280
294
337
451
445
323
479
492
486
135
121
109
34
20
36
22
137
123
490
484
309
453
335
321
447
282
296
269
527
241
255
533
254
532
526
240
268
297
283
320
446
452
334
308
485
491
122
136
23
37
33
27
132
126
495
481
330
456
442
324
318
287
293
244
522
536
250
278
279
537
251
245
523
292
286
319
443
325
331
457
480
494
127
133
26
32
18
24
30
125
131
119
482
496
327
441
455
333
469
290
284
253
535
521
247
509
508
520
246
252
534
285
291
468
454
332
326
440
497
483
118
130
124
31
25
19
42
4
56
180
194
81
95
143
157
382
396
369
341
427
433
355
209
235
553
547
221
546
220
234
552
208
432
354
340
426
368
397
383
156
142
94
80
195
181
5
57
43
55
7
41
69
197
183
96
168
82
154
140
395
381
418
356
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):
self.res9 = MultiResBlock(self.up9.outc*2, 32)
self.pool = nn.MaxPool2d(2)
# self.outconv = nn.Sequential(
# nn.Conv2d(self.res9.outc, n_classes, kernel_size = 1),
# nn.Sigmoid()
# )
self.outconv = nn.Conv2d(self.res9.outc, n_classes,kernel_size = 1)
self.outconv = nn.Sequential(
nn.Conv2d(self.res9.outc, n_classes, kernel_size = 1),
nn.Sigmoid()
)
# self.outconv = nn.Conv2d(self.res9.outc, n_classes,kernel_size = 1)
def forward(self, x):
x = self.inconv(x)
......
......@@ -4,7 +4,7 @@ import torch
import torchvision
import torch.nn as nn
import torch.nn.functional as F
import torchsnooper
# import torchsnooper
def conv(in_channel, out_channel):
......@@ -37,7 +37,7 @@ class MultiResBlock(nn.Module):
self.norm = nn.BatchNorm2d(self.outc)
self.seq = nn.Sequential(nn.ReLU(inplace = True), nn.BatchNorm2d(self.outc))
#@torchsnooper.snoop()
# @torchsnooper.snoop()
def forward(self, x):
shortcut = self.shortcut(x)
......
......@@ -7,11 +7,12 @@ from tqdm import tqdm
import torch
import torch.nn as nn
from torch import optim
from torch.optim import lr_scheduler
from torchvision import transforms
from torch.utils.data import DataLoader, random_split
from utils.dataset import BasicDataset,VOCSegmentation
from utils.eval import eval_net
from utils.dataset import BasicDataset, VOCSegmentation
from utils.eval import eval_net,eval_multi,eval_jac
dir_checkpoint = 'checkpoint/'
......@@ -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)
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):
net.train()
......@@ -47,9 +49,13 @@ def train_net(net, device, epochs = 5, batch_size = 1, lr = 0.1):
loss.backward()
optimizer.step()
pbar.update(imgs.shape[0])
val_score = eval_net(net, val_loader, device, n_val)
logging.info('Validation : {}'.format(val_score))
dice = eval_net(net, val_loader, device, n_val)
jac = eval_jac(net,val_loader,device,n_val)
# 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:
try:
os.mkdir(dir_checkpoint)
......
......@@ -51,8 +51,7 @@ if __name__ == '__main__':
logging.info(f'Network:\n'
f'\t{net.n_channels} input channels\n'
f'\t{net.n_classes} output channels (classes)\n'
f'\t{"Bilinear" if net.bilinear else "Dilated conv"} upscaling')
f'\t{net.n_classes} output channels (classes)\n')
if args.load:
net.load_state_dict(torch.load(args.load, map_location = device))
......
......@@ -9,6 +9,7 @@ import torch
import torch.nn as nn
from torch import optim
from torchvision import transforms
from torch.optim import lr_scheduler
from tqdm import tqdm
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)
# optimizer = optim.Adam(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()
if net.n_classes > 1:
criterion = nn.CrossEntropyLoss()
......@@ -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):
net.train()
epoch_loss = 0
with tqdm(total = n_train, desc = f'Epoch {epoch + 1}/{epochs}', unit = 'img') as pbar:
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)
pbar.update(imgs.shape[0])
global_step += 1 # if global_step % (len(dataset) // (10 * batch_size)) == 0:
val_score = eval_net(net, val_loader, device, n_val)
scheduler.step(val_score)
if net.n_classes > 1:
logging.info('Validation cross entropy: {}'.format(val_score))
writer.add_scalar('Loss/test', val_score, global_step)
......
......@@ -8,9 +8,6 @@ import torch
from torch.utils.data import Dataset
import logging
from PIL import Image
import imgaug as ia
import imgaug.augmenters as iaa
from imgaug.augmentables.segmaps import SegmentationMapsOnImage
import os
from torchvision.datasets.vision import VisionDataset
......@@ -87,10 +84,21 @@ class VOCSegmentation(VisionDataset):
self.masks = [os.path.join(mask_dir, x + ".png") for x in file_names]
assert (len(self.images) == len(self.masks))
self.seq = iaa.Sequential([iaa.SomeOf((0, 5), [iaa.Noop(), iaa.Fliplr(0.5),
iaa.Sometimes(0.25, iaa.Dropout(p = (0, 0.1))), iaa.Affine(rotate = (-45, 45)),
iaa.ElasticTransformation(alpha = 50, sigma = 5)
], random_order = True)])
@classmethod
def preprocess(cls, pil_img):
pil_img = pil_img.resize((256, 256))
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):
img = Image.open(self.images[index]).convert('L')
......@@ -99,10 +107,11 @@ class VOCSegmentation(VisionDataset):
pim = target.load()
for i 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 = self.preprocess(img)
# target = self.preprocess(img)
if self.transforms is not None:
img, target = self.transforms(img, target)
......
import torch
from torch.autograd import Function
class DiceCoeff(Function):
"""Dice coeff for individual examples"""
......@@ -10,22 +9,18 @@ class DiceCoeff(Function):
eps = 0.0001
self.inter = torch.dot(input.view(-1), target.view(-1))
self.union = torch.sum(input) + torch.sum(target) + eps
t = (2 * self.inter.float() + eps) / self.union.float()
return t
# This function has only a single output, so it gets only one gradient
def backward(self, grad_output):
input, target = self.saved_variables
grad_input = grad_target = None
if self.needs_input_grad[0]:
grad_input = grad_output * 2 * (target * self.union - self.inter) \
/ (self.union * self.union)
if self.needs_input_grad[1]:
grad_target = None
return grad_input, grad_target
......@@ -40,3 +35,13 @@ def dice_coeff(input, target):
s = s + DiceCoeff().forward(c[0], c[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.nn.functional as F
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):
......@@ -11,10 +13,7 @@ def eval_net(net, loader, device, n_val):
tot = 0
with tqdm(total=n_val, desc='Validation round', unit='img', leave=False) as pbar:
for batch in loader:
imgs = batch['image']
true_masks = batch['mask']
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)
......@@ -26,7 +25,48 @@ def eval_net(net, loader, device, n_val):
if net.n_classes > 1:
tot += F.cross_entropy(pred.unsqueeze(dim=0), true_mask.unsqueeze(dim=0)).item()
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])
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
......@@ -24,3 +24,24 @@ def predict_img(net, full_img, device, out_threshold = 0.5):
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
\ 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