TeamHG-Memex / tensorboard_logger

Log TensorBoard events without touching TensorFlow
MIT License
630 stars 50 forks source link

Plotting Precision Recall Curve #23

Closed pyaf closed 6 years ago

pyaf commented 6 years ago

Hi, I'm training a object detection framework, at the end of each epoch I want to plot Precision Recall curve on tensorboard. As far as I can I have log_value function which takes one value (float/int) at a time and log_histogram takes a value (list/tuple) which can't be used to plot the PR curve. Is there any way I can plot PR curve using tensorboard_logger?

lopuhin commented 6 years ago

Hi @pyaf, do you know how to accomplish this with just tensorboard? Do you want to log how PR curve changes over the course of training, or plot a single PR curve?

pyaf commented 6 years ago

do you know how to accomplish this with just tensorboard?

Nope

Do you want to log how PR curve changes over the course of training, or plot a single PR curve?

I want to log how PR curve changes over the course of training.

lopuhin commented 6 years ago

I see, thanks for clarification. The only way I know should work is to plot PR curve as an image (using some external tooling e.g. matplotlib), and then use log_images from tensorboard_logger https://github.com/TeamHG-Memex/tensorboard_logger/blob/ac5f3fc19ecb7d667a665de9675c73542b9bb596/tensorboard_logger/tensorboard_logger.py#L115-L173 - I hope this would accomplish what you want (but note that I never logged images, so I'm not sure if they are good enough for your usecase).

pyaf commented 6 years ago

@lopuhin Thanks, I'll try this one.