OTB.MultiImageSamplingRate: Compute sampling rate for an input set of images.

The application computes sampling rates for a set of input images. Before calling this application, each pair of image and training vectors has to be analysed with the application PolygonClassStatistics. The statistics file is then used to compute the sampling rates for each class in each image. Several types of sampling are implemented. Each one is a combination of a mono-image strategy and a multi-image mode. The mono-image strategies are : * smallest (default) : select the same number of sample in each class so that the smallest one is fully sampled. * constant : select the same number of samples N in each class (with N below or equal to the size of the smallest class). * byclass : set the required number for each class manually, with an input CSV file (first column is class name, second one is the required samples number).The multi-image modes (mim) are proportional, equal and custom. The custom mode lets the users choose the distribution of samples among the images. The different behaviours are described below. Ti(c) and Ni(c) refers resp. to the total number and needed number of samples in image i for class c. Let's call L the total number of images. * strategy = all - Same behaviour for all modes : take all samples * strategy = constant : let's call M the global number of samples required per class. For each image i and each class c: - if mim = proportional, then Ni( c ) = M * Ti( c ) / sum_k( Tk(c) ) - if mim = equal , then Ni( c ) = M / L - if mim = custom , then Ni( c ) = Mi where Mi is the custom requested number of samples for image i * strategy = byClass : let's call M(c) the global number of samples for class c). For each image i and each class c: - if mim = proportional, then Ni( c ) = M(c) * Ti( c ) / sum_k( Tk(c) ) - if mim = equal , then Ni( c ) = M(c) / L - if mim = custom , then Ni( c ) = Mi(c) where Mi(c) is the custom requested number of samples for image i and class c * strategy = percent : For each image i and each class c: - if mim = proportional, then Ni( c ) = p * Ti( c ) where p is the global percentage of samples - if mim = equal , then Ni( c ) = p * sum_k(Tk(c)]/L where p is the global percentage of samples - if mim = custom , then Ni( c ) = p(i) * Ti(c) where p(i) is the percentage of samples for image i. c * strategy = total : For each image i and each class c: - if mim = proportional, then Ni( c ) = total * (sum_k(Ti(k))/sum_kl(Tl(k))) * (Ti(c)/sum_k(Ti(k))) where total is the total number of samples specified. - if mim = equal , then Ni( c ) = (total / L) * (Ti(c)/sum_k(Ti(k))) where total is the total number of samples specified. - if mim = custom , then Ni( c ) = total(i) * (Ti(c)/sum_k(Ti(k))) where total(i) is the total number of samples specified for image i. * strategy = smallest class - if mim = proportional, then the smallest class size (computed globally) is used for the strategy constant+proportional. - if mim = equal , then the smallest class size (computed globally) is used for the strategy constant+equal. - if mim = custom , then the smallest class is computed and used for each image separately.

Inputs

strategy

string
Please set a value for il.

Number of samples for all classes.In the case of the custom multi-image mode, several values can be given for each image.

string
Please set a value for strategy.byclass.in.

The percentage(s) to use In the case of the custom multi-image mode, several values can be given for each image.

string
Please set a value for strategy.percent.p.

The number of samples to generateIn the case of the custom multi-image mode, several values can be given for each image.

string
Please set a value for strategy.total.v.

mim

string
Please set a value for mim.

Outputs

Output filename storing sampling rates (CSV format with class name, required samples, total samples, and rate). The given filename will be used with a suffix to indicate the corresponding input index (for instance: rates.csv will give rates_1.csv, rates_2.csv, ...).

format
transmission

Execution options

successUri
inProgressUri
failedUri

format

mode

Execute End Point

View the execution endpoint of a process.

View the alternative version in HTML.

{"id": "OTB.MultiImageSamplingRate", "title": "Compute sampling rate for an input set of images.", "description": "The application computes sampling rates for a set of input images. Before calling this application, each pair of image and training vectors has to be analysed with the application PolygonClassStatistics. The statistics file is then used to compute the sampling rates for each class in each image. Several types of sampling are implemented. Each one is a combination of a mono-image strategy and a multi-image mode. The mono-image strategies are : * smallest (default) : select the same number of sample in each class so that the smallest one is fully sampled. * constant : select the same number of samples N in each class (with N below or equal to the size of the smallest class). * byclass : set the required number for each class manually, with an input CSV file (first column is class name, second one is the required samples number).The multi-image modes (mim) are proportional, equal and custom. The custom mode lets the users choose the distribution of samples among the images. The different behaviours are described below. Ti(c) and Ni(c) refers resp. to the total number and needed number of samples in image i for class c. Let's call L the total number of images. * strategy = all - Same behaviour for all modes : take all samples * strategy = constant : let's call M the global number of samples required per class. For each image i and each class c: - if mim = proportional, then Ni( c ) = M * Ti( c ) / sum_k( Tk(c) ) - if mim = equal , then Ni( c ) = M / L - if mim = custom , then Ni( c ) = Mi where Mi is the custom requested number of samples for image i * strategy = byClass : let's call M(c) the global number of samples for class c). For each image i and each class c: - if mim = proportional, then Ni( c ) = M(c) * Ti( c ) / sum_k( Tk(c) ) - if mim = equal , then Ni( c ) = M(c) / L - if mim = custom , then Ni( c ) = Mi(c) where Mi(c) is the custom requested number of samples for image i and class c * strategy = percent : For each image i and each class c: - if mim = proportional, then Ni( c ) = p * Ti( c ) where p is the global percentage of samples - if mim = equal , then Ni( c ) = p * sum_k(Tk(c)]/L where p is the global percentage of samples - if mim = custom , then Ni( c ) = p(i) * Ti(c) where p(i) is the percentage of samples for image i. c * strategy = total : For each image i and each class c: - if mim = proportional, then Ni( c ) = total * (sum_k(Ti(k))/sum_kl(Tl(k))) * (Ti(c)/sum_k(Ti(k))) where total is the total number of samples specified. - if mim = equal , then Ni( c ) = (total / L) * (Ti(c)/sum_k(Ti(k))) where total is the total number of samples specified. - if mim = custom , then Ni( c ) = total(i) * (Ti(c)/sum_k(Ti(k))) where total(i) is the total number of samples specified for image i. * strategy = smallest class - if mim = proportional, then the smallest class size (computed globally) is used for the strategy constant+proportional. - if mim = equal , then the smallest class size (computed globally) is used for the strategy constant+equal. - if mim = custom , then the smallest class is computed and used for each image separately.", "version": "1.0.0", "jobControlOptions": ["sync-execute", "async-execute", "dismiss"], "outputTransmission": ["value", "reference"], "links": [{"rel": "http://www.opengis.net/def/rel/ogc/1.0/execute", "type": "application/json", "title": "Execute End Point", "href": "http://tb17.geolabs.fr:8119/ogc-api/processes/OTB.MultiImageSamplingRate/execution"}, {"rel": "alternate", "type": "text/html", "title": "Execute End Point", "href": "http://tb17.geolabs.fr:8119/ogc-api/processes/OTB.MultiImageSamplingRate/execution.html"}], "inputs": {"il": {"title": "strategy", "description": "strategy", "schema": {"type": "string", "default": "smallest", "enum": ["byclass", "constant", "smallest", "percent", "total", "all"]}, "id": "il"}, "strategy.byclass.in": {"title": "Number of samples for all classes.In the case of the custom multi-image mode, several values can be given for each image.", "description": "Number of samples for all classes.In the case of the custom multi-image mode, several values can be given for each image.", "schema": {"type": "string"}, "id": "strategy.byclass.in"}, "strategy.percent.p": {"title": "The percentage(s) to use In the case of the custom multi-image mode, several values can be given for each image.", "description": "The percentage(s) to use In the case of the custom multi-image mode, several values can be given for each image.", "schema": {"type": "string"}, "id": "strategy.percent.p"}, "strategy.total.v": {"title": "The number of samples to generateIn the case of the custom multi-image mode, several values can be given for each image.", "description": "The number of samples to generateIn the case of the custom multi-image mode, several values can be given for each image.", "schema": {"type": "string"}, "id": "strategy.total.v"}, "mim": {"title": "mim", "description": "mim", "schema": {"type": "string", "default": "proportional", "enum": ["proportional", "equal", "custom"]}, "id": "mim"}}, "outputs": {"out": {"title": "Output filename storing sampling rates (CSV format with class name, required samples, total samples, and rate). The given filename will be used with a suffix to indicate the corresponding input index (for instance: rates.csv will give rates_1.csv, rates_2.csv, ...).", "description": "Output filename storing sampling rates (CSV format with class name, required samples, total samples, and rate). The given filename will be used with a suffix to indicate the corresponding input index (for instance: rates.csv will give rates_1.csv, rates_2.csv, ...).", "extended-schema": {"oneOf": [{"allOf": [{"$ref": "http://zoo-project.org/dl/link.json"}, {"type": "object", "properties": {"type": {"enum": ["text/csv"]}}}]}, {"type": "object", "required": ["value"], "properties": {"value": {"oneOf": [{"type": "string", "contentEncoding": "utf-8", "contentMediaType": "text/csv"}]}}}]}, "schema": {"oneOf": [{"type": "string", "contentEncoding": "utf-8", "contentMediaType": "text/csv"}]}, "id": "out"}}}

http://tb17.geolabs.fr:8119/ogc-api/processes/OTB.MultiImageSamplingRate.html
Last modified: Sat Feb 19 15:43:34 CET 2022