mapreader.spot_text.deepsolo_runner
Classes
Module Contents
- class mapreader.spot_text.deepsolo_runner.DeepSoloRunner(patch_df, parent_df=None, cfg_file='./DeepSolo/configs/R_50/IC15/finetune_150k_tt_mlt_13_15_textocr.yaml', weights_file='./ic15_res50_finetune_synth-tt-mlt-13-15-textocr.pth', device='default', delimiter=',')
Bases:
mapreader.spot_text.runner_base.Runner- Parameters:
patch_df (pandas.DataFrame | str)
parent_df (pandas.DataFrame | str)
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
- voc_size_len
- CTLABELS_len
- 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