Closed EricHanLiu closed 6 years ago
Finished the idea, works properly now with a variable amount of input and output ports.
Note that the number of input/output ports for layers should be the same, excluding the mandatory layer 0 output port (background layer)
Now just need to disable the create and remove layer buttons in the wrapper.
Oh, great!
On Wed, May 30, 2018 at 11:55 AM, Eric Han Liu notifications@github.com wrote:
Finished the idea, works properly now with a variable amount of input and output ports.
Note that the number of input/output ports for layers should be the same, excluding the mandatory layer 0 output port (background layer)
Now just need to disable the create and remove layer buttons in the wrapper.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/DDMAL/pixel_wrapper/issues/24#issuecomment-393215648, or mute the thread https://github.com/notifications/unsubscribe-auth/AAeCxUXPULiNeJykqcxg8e7lra-_FGqQks5t3sDegaJpZM4USPqL .
Moved the mandatory layer 0 output port to always contain the backgroundLayer (this layer is now added at front of the layers list instead of the end). Number of layers should be variablized now, running some tests.
@vigliensoni we need to discuss whether those buttons will be kept!
It works!
One caveat is that the user must have the same amount of optional input and output ports. The input ports should exclude the background layer that gets output from CM. The number of optional output ports that the user creates should be the number of layers of classification excluding the background layer, which is the mandatory port (layer 0). Otherwise the Rodan job will fail.
In other words, each optional input layer (say PNG - Layer 3 Input
) should have a matching optional output layer (say rgba PNG - Layer 3 Output
).
This goes in hand with the creation and deletion of layers, which should be discussed first.
Doesn't seem like it's possible to get the number of output ports from within a job (the controller only passes to the view in the get_my_interface()
method, which only has inputs
within its scope (not outputs
).
I've asked Andrew and he says he doesn't know how/if it's possible to get the number of output ports from within a job's scope.
It seems like the best solution perhaps is to just enable the buttons if there's no inputs (so the user is creating the ground truth), and then specify in the tutorial that they must create the same number of layers as the output ports. We'd disable the buttons otherwise.
Created checks in standalone Pixel.js code for:
Only create the create/deleteLayerButtons
if we're in one of those two cases.
Pull request accepted, this issue should be solved now. Will run some final trials and close if all goes well!
Pull request for actual pixel_wrapper
changes which implement this entire issue's solutions.
pull request accepted
Idea to try:
get_my_interface()
create an array of layer_urlsALSO NEED TO: