feat: custom output name#1104
Merged
carsen-stringer merged 3 commits intoMouseLand:mainfrom Feb 11, 2025
Merged
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1104 +/- ##
==========================================
+ Coverage 52.68% 52.69% +0.01%
==========================================
Files 18 18
Lines 4328 4338 +10
==========================================
+ Hits 2280 2286 +6
- Misses 2048 2052 +4 ☔ View full report in Codecov by Sentry. |
Member
|
thanks, I updated to a samefile check to ensure that the directories are really not the same |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
We have got some images in an input A folder and want to use the MouseLand/cellpose models on them. These images have a name that makes them unique and identifiable. After processing the MouseLand/cellpose models, we would like to have the results for each image in a folder B with the same file names as the input files. So image named X in folder B corresponds to image X in folder A after calculation by the AI.
MouseLand/cellpose team already made that possible thanks to the parameters
output_name. Unfortunately, it's impossible to set this parameter to an empty string, and that's perfectly normal because we do not want to ever over-write someone's original tif.Changes made
I have added the check that a different input (
dir) and output (savedir) folders are properly passed as parameters and if so, then you don't need to add anything to the output file (output_name) name.Benefits
In cases where the input folder (
dir) and output folder (savedir) are defined and different, you can now keep the exact same name for the results files. This simplifies the steps in a complex workflow, where image analysis steps follow one another and file names are used as identifiers.Examples
Before:
New commands:
After new different commands: