Skip to content

pix2pix_ZeroCostDL4Mic - Errors when launching from CLI #58

@antho214

Description

@antho214

Describe the bug

There are multiple issues when running the pix2pix_ZeroCostDL4Mic.ipynb. I will try to summarize here the issues and how I solved the issue. I am using the CLI method. I am pulling the Docker image from online.

A. Running install multiple times breaks the installation.
B. Path to Training_source cannot be found. I am getting this error

FileNotFoundError: [Errno 2] No such file or directory: 'data/denoising-data/ov-lqhq-mt-tif/fixed_cell_microtubule_u2os_alphatubulin_star635p/training_data/low_intensity_image_patches'

C. Prepare the training data for training fails (3.1). This means that the folder AB does not get filled with the images. I am getting this error

Traceback (most recent call last):
  File "pytorch-CycleGAN-and-pix2pix/datasets/combine_A_and_B.py", line 27, in <module>
    fold_A = Path(args.fold_A)
NameError: name 'Path' is not defined

D. In section 3.2 when running the code, the option --display 0 is not a valid option for the training script.

To Reproduce

A. Running the cell multiple times will recursively clone the pytorch-CycleGAN-and-pix2pix repository within the already available folder pytorch-CycleGAN-and-pix2pix.
B. Copy the path of a folder and paste it in the destination.
C. Run the cell and see the output. Note that I am using my previous fix (A, B)
D. Run the cell and see the output. Note that I am using my previous fix (A, B, C)

Expected behavior

A. Running the installation cell should not break the installation. This can be solved by simply adding a os.chdir("/home") at the beginning of the cell solves the issue.
B. I think it should be mentioned somewhere that the path is relative to the last os.chdir which in this context means within the pytorch-CycleGAN-and-pix2pix directory. The issue is simply fixed by the user by adding a /home/... in front of the copy-paste path to the folder. This also applies for the model path.
C. I am expecting that the AB folder to get filled. This issue can be solved by simply adding one import in this file

# Inside pytorch-CycleGAN-and-pix2pix/datasets/combine_A_and_B.py
import ...
from pathlib import Path

D. Removing the option in both call to the training files lines allows to train the model without any issues.

Screenshots

A.
Image

B.
Image

C.
Image

Desktop (please complete the following information):

  • OS: Ubuntu 20
  • Browser: Chrome

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions