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

Add scale argument to create_deepcell_output and run_deepcell_task functions #323

Merged
merged 3 commits into from
Nov 5, 2020

Conversation

awedwards
Copy link
Contributor

@awedwards awedwards commented Nov 5, 2020

What is the purpose of this PR?

Addresses and closes #322 . This change allows users to add a scale value as input to create_deepcell_output, which rescales the data before prediction.

How did you implement your changes

I added scale as an input argument to the create_deepcell_output and run_deepcell_task functions in the util module. The default value is 1.0 for both functions. Finally, before the value is submitted to the server, it is converted from float to string, as required by the deepcell API. I figured that most users would intuitively provide the scale value as a float.

Copy link
Member

@ngreenwald ngreenwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Two things.

  1. Can you update the description of the PR to close your issue?
  2. Can you test this out with some data? We don't do any correctness checks for the kiosk-client, so maybe you could take a file and run it using rescale of 2.0 and 0.5 to make sure it modifies predictions appropriately

@awedwards
Copy link
Contributor Author

I tested this with the data in the example_dataset folder, setting the rescale to 2.0 and 0.5. Both looked reasonable: at 2.0, the predicted objects were much larger than at 1.0, and at 0.5 the objects were smaller. I can upload some screenshots if that is necessary.

@ngreenwald
Copy link
Member

Awesome!

@ngreenwald ngreenwald merged commit e5298f8 into master Nov 5, 2020
@ngreenwald ngreenwald deleted the rescale_deepcell_input branch November 5, 2020 21:54
alex-l-kong pushed a commit that referenced this pull request Jan 14, 2021
…nctions (#323)

* added scale arg to create_deepcell_output and run_deepcell_task  functions

* added scale arg to deepcell_service_utils_test function

* fixed style errors
y2kbugger pushed a commit that referenced this pull request Jul 29, 2021
…nctions (#323)

* added scale arg to create_deepcell_output and run_deepcell_task  functions

* added scale arg to deepcell_service_utils_test function

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

Successfully merging this pull request may close these issues.

Changing the rescaling value for deepcell input
2 participants