From 4669a361ee58ab77f02c8ad87305292a753f8c95 Mon Sep 17 00:00:00 2001 From: Zaid Siddiqui Date: Sun, 18 Oct 2020 21:51:21 -0400 Subject: [PATCH 1/3] Fix NaN error running example Implemented fix referenced in issue 171 on upstream repo where NaN error is thrown when running "download_and_train.py" Resolve: #171 --- examples/download_and_train.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/download_and_train.py b/examples/download_and_train.py index ba2bd26..9f4ea89 100644 --- a/examples/download_and_train.py +++ b/examples/download_and_train.py @@ -82,10 +82,8 @@ df = pd.DataFrame(columns=["path_tiff", "channel_signal", "channel_target"]) df["path_tiff"] = image_target_paths -df["channel_signal"] = data_manifest["ChannelNumberBrightfield"] -df["channel_target"] = data_manifest[ - "ChannelNumber405" -] # this is the DNA channel for all FOVs +df["channel_signal"] = data_manifest["ChannelNumberBrightfield"].tolist() +df["channel_target"] = data_manifest["ChannelNumber405"].tolist() # this is the DNA channel for all FOVs n_train_images = int(n_images_to_download * train_fraction) df_train = df[:n_train_images] From c8e445aac212d4db21eed2c900fcd6c1f5eb1872 Mon Sep 17 00:00:00 2001 From: Zaid Siddiqui Date: Mon, 9 Nov 2020 09:23:27 -0500 Subject: [PATCH 2/3] Add prediction dirs to gitignore --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 24ceb6e..5d027ff 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,11 @@ wheels/ .installed.cfg *.egg +# Data/Predictions +fovs* +model* +predictions* + # OS generated files .DS_Store From d4754c3853e3f58392c7c37b8137df4a98086f5a Mon Sep 17 00:00:00 2001 From: Zaid Siddiqui Date: Mon, 9 Nov 2020 10:21:16 -0500 Subject: [PATCH 3/3] Remove extra "/" in paths --- examples/download_and_train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/download_and_train.py b/examples/download_and_train.py index 9f4ea89..297facf 100644 --- a/examples/download_and_train.py +++ b/examples/download_and_train.py @@ -34,7 +34,7 @@ n_images_to_download = args.n_imgs # more images the better train_fraction = 0.75 -image_save_dir = "{}/".format(os.getcwd()) +image_save_dir = "{}".format(os.getcwd()) model_save_dir = "{}/model/".format(os.getcwd()) prefs_save_path = "{}/prefs.json".format(model_save_dir)