mapreader.spot_text.maptext_runner
Classes
Module Contents
- class mapreader.spot_text.maptext_runner.MapTextRunner(patch_df, parent_df=None, cfg_file='./MapTextPipeline/configs/ViTAEv2_S/rumsey/final_rumsey.yaml', weights_file='./rumsey-finetune.pth', device='default', delimiter=',')
Bases:
mapreader.spot_text.runner_base.Runner- Parameters:
patch_df (pandas.DataFrame)
parent_df (pandas.DataFrame)
cfg_file (str | pathlib.Path)
weights_file (str | pathlib.Path)
device (str)
delimiter (str)
- patch_predictions
- parent_predictions
- geo_predictions
- cfg
- WEIGHTS
- DEVICE
- voc_size
- use_customer_dictionary
- predictor
- get_patch_predictions(outputs, return_dataframe=False, min_ioa=0.7)
Post process the model outputs to get patch predictions.
- Parameters:
outputs (dict) – The outputs from the model.
return_dataframe (bool, optional) – Whether to return the predictions as a pandas DataFrame, by default False
min_ioa (float, optional) – The minimum intersection over area to consider two polygons the same, by default 0.7
- Returns:
A dictionary containing the patch predictions or a DataFrame if as_dataframe is True.
- Return type:
dict or pd.DataFrame