working generators + model tests
This commit is contained in:
parent
72852a7357
commit
59b2b9e687
@ -1,2 +1,3 @@
|
|||||||
from consts import *
|
from consts import *
|
||||||
from helpers import *
|
from helpers import *
|
||||||
|
from metrics import *
|
@ -2,10 +2,10 @@ import pandas as pd
|
|||||||
FEATURES ='../data/train_features'
|
FEATURES ='../data/train_features'
|
||||||
LABELS = '../data/train_labels'
|
LABELS = '../data/train_labels'
|
||||||
JPG_IMAGES = '../images'
|
JPG_IMAGES = '../images'
|
||||||
RGB_DIR = "rgb"
|
RGB_DIR = "rgb/img"
|
||||||
FC_DIR = "fc"
|
FC_DIR = "fc/img"
|
||||||
MASK_DIR = "mask"
|
MASK_DIR = "mask/img"
|
||||||
METADATA = pd.read_csv('../data/train_metadata.csv')
|
# METADATA = pd.read_csv('../data/train_metadata.csv')
|
||||||
|
|
||||||
BATCH = 8
|
BATCH = 8
|
||||||
IMG_SIZE = (512,512)
|
IMG_SIZE = (512,512)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
from metrics import IOU
|
from src.metrics import IOU
|
||||||
|
|
||||||
|
|
||||||
class jaccard_loss(tf.keras.losses.Loss):
|
class jaccard_loss(tf.keras.losses.Loss):
|
||||||
|
@ -25,6 +25,5 @@ if __name__ == "__main__":
|
|||||||
if(not os.path.exists(os.path.join(dp, d +'.jpeg')) or not os.path.exists(os.path.join(fc, d +'.jpeg')) or not os.path.exists(os.path.join(mk, d +'.jpeg'))):
|
if(not os.path.exists(os.path.join(dp, d +'.jpeg')) or not os.path.exists(os.path.join(fc, d +'.jpeg')) or not os.path.exists(os.path.join(mk, d +'.jpeg'))):
|
||||||
convert_tif_to_jpg(os.path.join(FEATURES, d), os.path.join(LABELS, d + ".tif"), dp, fc, mk)
|
convert_tif_to_jpg(os.path.join(FEATURES, d), os.path.join(LABELS, d + ".tif"), dp, fc, mk)
|
||||||
elif(sys.argv[1] == '--show'):
|
elif(sys.argv[1] == '--show'):
|
||||||
|
|
||||||
img_names = [random.choice(os.listdir(dp)) for _ in range(3)]
|
img_names = [random.choice(os.listdir(dp)) for _ in range(3)]
|
||||||
plot_image_grid(img_names)
|
plot_image_grid(img_names)
|
125
unet.ipynb
125
unet.ipynb
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user