basicsr.utils.plot_util¶
- basicsr.utils.plot_util.read_data_from_tensorboard(log_path, tag)[source]¶
Get raw data (steps and values) from tensorboard events.
- Parameters:
log_path (str) – Path to the tensorboard log.
tag (str) – tag to be read.
- basicsr.utils.plot_util.read_data_from_txt_1v(path, pattern)[source]¶
Read data from txt with 1 returned values.
- Parameters:
path (str) – path to the txt file.
pattern (str) – re (regular expression) pattern.
- basicsr.utils.plot_util.read_data_from_txt_2v(path, pattern, step_one=False)[source]¶
Read data from txt with 2 returned values (usually [step, value]).
- Parameters:
path (str) – path to the txt file.
pattern (str) – re (regular expression) pattern.
step_one (bool) – add 1 to steps. Default: False.
- basicsr.utils.plot_util.smooth_data(values, smooth_weight)[source]¶
Smooth data using 1st-order IIR low-pass filter (what tensorflow does).
Reference: https://github.com/tensorflow/tensorboard/blob/f801ebf1f9fbfe2baee1ddd65714d0bccc640fb1/tensorboard/plugins/scalar/vz_line_chart/vz-line-chart.ts#L704 # noqa: E501
- Parameters:
values (list) – A list of values to be smoothed.
smooth_weight (float) – Smooth weight.