TUT-ARG / sed_vis

Visualization toolbox for Sound Event Detection
MIT License
114 stars 29 forks source link

Visualizer with probability #4

Closed JingpengSun closed 5 years ago

JingpengSun commented 5 years ago

Hi, when I run the Quickstart: Using sed_vis in Python code with the demo file a001.wav and a001_system_output_prob.csv that is:

import sed_vis import dcase_util audio_container = dcase_util.containers.AudioContainer().load( './tests/data/a001.wav' ) reference_event_list = dcase_util.containers.MetaDataContainer().load( './tests/data/a001.ann' ) estimated_event_list = dcase_util.containers.MetaDataContainer().load( './tests/data/a001_system_output_prob.csv' ) event_lists = { 'reference': reference_event_list, 'estimated': estimated_event_list } vis = sed_vis.visualization.EventListVisualizer(event_lists=event_lists, audio_signal=audio_container.data, sampling_rate=audio_container.fs) vis.show()

However, I got the following warning: .../lib/python2.7/site-packages/matplotlib/figure.py:2299: UserWarning: This figure includes Axes that are not compatible with tight_layout, so results might be incorrect. warnings.warn("This figure includes Axes that are not compatible " .../lib/python2.7/site-packages/matplotlib/tight_layout.py:209: UserWarning: tight_layout cannot make axes height small enough to accommodate all axes decorations warnings.warn('tight_layout cannot make axes height small enough '

and the resulted png figure didn't show probability and the estimated results were also gone.

I don't know how to figure it out, can you give me some tips? Thank you very much!

toni-heittola commented 5 years ago

I cannot reproduce this issue with Python 3.6 and matplotlib 2.2.3. What version of matplotlib you are using? Seems that you are using Python 2.7.

JingpengSun commented 5 years ago

Thank you for your prompt reply. Yes, I am using Python2.7 in order to use this repo directly. And the version of matplotlib is 2.2.4. So, can we do something to make it work?

toni-heittola commented 5 years ago

Unfortunately, it seems that I cannot reproduce this issue even with matching matplotlib version. I get correct png-file when using vis.save(filename='test.png') instead of vis.show().

JingpengSun commented 5 years ago

Ok, thank you~ I will take more tries~ I close it.