show_detections¶
- giant.ufo.visualizer.show_detections(ufos, camera, save_frames=False, interactive=True, frame_output='./{}.png', log_scale=False)[source]¶
This function plots possible UFO detections for each turned on image in
camera
over top of the image.For each individual image, the ufo results contained in the
ufos
dataframe are plotted as a scatter plot colored by their quality code. The image itself is displayed as normal, or possibly using a “log” scale to bring out dimmer features in the image.There are 3 different options for displaying these figures. The first, if
interactive
isTrue
shows the images/ufos in a single window where you can navigate from frame to frame using the left/right arrow keys. This is the recommended way to view the results.The second option for displaying the figures is to save them directly to a file if
save_frames
isTrue
. The file the figures are saved to is controlled by theframe_output
input which should be a string giving the path to save the files to as well as a format specifier {} to replace with the image file.The final, not-recommended option, is to show all of the figures at once by setting both
save_frames
andinteractive
toFalse
. This will make a single figure window for each image and will show them all simultaneously. This can use a ton of memory and is not recommended if you have more than 10 images you processed.- Parameters:
ufos (DataFrame) – A dataframe of the UFOs to show from
Detector.detection_data_frame
.camera (Camera) – The
Camera
containing the images that the detections were extracted fromsave_frames (bool) – A boolean flag specifying whether to save the figures to disk instead of displaying them
interactive (bool) – A boolean flag specifying whether to interactively walk through the images
frame_output (str) – A string with format specifier describing where to save the figures
log_scale (bool) – A boolean flag specifying to use a logarithmic scale to display the images, allowing dimmer things to stand out more