Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pixel/CM Summer 2018 overview #5

Open
4 of 9 tasks
vigliensoni opened this issue Apr 25, 2018 · 22 comments
Open
4 of 9 tasks

Pixel/CM Summer 2018 overview #5

vigliensoni opened this issue Apr 25, 2018 · 22 comments
Assignees

Comments

@vigliensoni
Copy link
Member

vigliensoni commented Apr 25, 2018

Test patch-wise classification method and Pixel

  • Test Pixel with single images in Rodan
  • Test patch-wise CM with single images in Rodan
  • Test opening and correcting the output of CM in Pixel in a single workflow
  • Test patch-wise CM with many resources in the job queue (several pages)
  • Design iterative, incremental Rodan workflow to correct portions of images and reclassify
  • Test CM and Pixel at large scale (full manuscript)

In order to do implement bullet point 5, we need to work on:

  • Finish patch-wise CM trainer wrapper
  • Implement iterative jobs in Rodan
  • Fix memory issue in Rodan Docker container
@EricHanLiu
Copy link
Contributor

EricHanLiu commented May 7, 2018

Pixel works as a job in Rodan taking jpg/png/tiff resource and outputs 3 layer resources

@vigliensoni
Copy link
Member Author

@EricHanLiu Did you actually perform a full test? Were you actually able to export all image layers and open them in RODAN?

@EricHanLiu
Copy link
Contributor

EricHanLiu commented May 8, 2018

All image layers can be exported (either as highlights, image data) and downloaded locally, or sent directly to Rodan to be piped into future jobs (saved as resources). The outputs are rgba+png files.

@EricHanLiu
Copy link
Contributor

EricHanLiu commented May 8, 2018

On step two we encountered a bug with Keras, and so the new workflow, which contains our patch-wise CM job, cannot finish. The issue is created and I'd like feedback from Jorge before trying a couple workarounds were presented on this issue.

@EricHanLiu
Copy link
Contributor

Jorge suggested it's a version inconsistency error (which I saw mentioned a lot also on the issue page), so I will try to verify which backend Keras is using and play around with the settings to see if that fixes the issue, otherwise maybe deleting the optimizer

@EricHanLiu
Copy link
Contributor

Keras uses Theano like suspected, tried second method which was to remove optimizer weights in each model file using a python script. This should fix the issue and allow us to checkoff the second part (test patch-wise CM with single images in Rodan)

@EricHanLiu
Copy link
Contributor

Patch-wise classification works with single images in Rodan (using the demo pre-trained models)

@fujinaga
Copy link
Member

fujinaga commented May 9, 2018

👍

@EricHanLiu
Copy link
Contributor

Using patch-wise CM as a Rodan job and piping the output layers (excluding background) into Pixel in a single workflow works, and the output of patch-wise CM can be corrected in Pixel and resubmitted to Rodan (or exported to CSV/highlight png/image-data png)

@EricHanLiu
Copy link
Contributor

Simultaneously testing adding another resource in the queue for the patch-wise classifier to run after the first pixel image was corrected, will update once it finishes (or segfaults)

@martha-thomae
Copy link

Patch-wise CM works with multiple images on the queue, we tried with 3 sections of full TIFF images, it generated the 4 layers (background, staff-lines, music symbols, and text) for each of them correctly.

@EricHanLiu
Copy link
Contributor

Also works when multiple images are input to patch-wise CM, and then piped into Pixel, multiple pixel jobs can be opened to correct classification and then resubmit to rodan

@vigliensoni
Copy link
Member Author

@EricHanLiu One Pixel job at a time in series or many of them in parallel?

@EricHanLiu
Copy link
Contributor

It depends on when the CM job finishes, but Pixel can be opened as soon as the CM job finishes and the last test we did (with two images) they finished simultaneously so two instances of Pixel could be opened with different classifications (although with the same image since Pixel only takes 1 image input in one job, so one of the classifications was off)
Since the fast CM doesn't output the original image, we can't load Pixel with the correct image for every job

@EricHanLiu
Copy link
Contributor

Pixel now can export a background layer along with the other 3 layers, with some caveats (see this issue). We've added another port, so the output of Pixel can be piped directly into the fast CM trainer as ground truth.

@EricHanLiu
Copy link
Contributor

Pixel now almost entirely works, only bug that remains is the erasing other layers one. However, multiple exports with edits in between can now be done without error, and export to image data successfully works.

@vigliensoni
Copy link
Member Author

☀️ ☀️ ☀️

@EricHanLiu
Copy link
Contributor

Pixel's background layer is now generated through pixel subtraction instead of path/shape subtraction, so it is now compatible with the Calvo classifier's output. Background layer generation is assigned to a button, so user has the option to generate it.

@EricHanLiu
Copy link
Contributor

Iterative, incremental Rodan workflow depends on some sort of Rodan loop being implemented, as well as the patch-wise classifier being finished.

@EricHanLiu
Copy link
Contributor

selectRegionLayer is implemented with a tutorial tooltip and restrictions on bad usage. Pixel is a submodule so pixel_wrapper is the latest version, but create/delete layer buttons were removed since they shouldn't be features within a workflow.

Number of default layers is generated based on either the number of input ports, or a prompt will ask the user how many layers. The input and output ports for layers are now optional, with max being 7 layers.

The background is only generated within the selection regions, and it has been optimized to only iterate within those regions. Generation has been moved to submitToRodan button and Pixel closes automatically after exporting.

Not sure what else needs to be done for this issue aside from fixing the Docker swap memory bug, and figuring out what exactly we're doing with the CM training

@EricHanLiu
Copy link
Contributor

How should we proceed here with the next checkbox?

Design iterative, incremental Rodan workflow to correct portions of images and reclassify

@vigliensoni
Copy link
Member Author

vigliensoni commented Jun 28, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants