MTG / gaia

C++ library to apply similarity measures and classifications on the results of audio analysis, including Python bindings. Together with Essentia it can be used to compute high-level descriptions of music.
http://essentia.upf.edu
GNU Affero General Public License v3.0
272 stars 66 forks source link

C++ YAML loader fails to parse JSON files that are considered valid YAMLs #85

Open palonso opened 5 years ago

palonso commented 5 years ago

Gaia generates empty points when parsing JSON files considered valid YAMLs with the C++ YAML loader. These JSONs are considered valid YAMLs by several online parsers such as yamllint or ypaste. Also succedded to parse those with the python wrappers included in Gaia fastyaml and yaml. This behavior should be improved for further consistency among parsers.

For the moment, a valid workaround is to use the json_to_sig.py script provided by Gaia. Which generates valid YAMLs for the C++ parser.

This behavior was obtained by extracting some JSONs with Essentia's essentia_streaming_extractor_music and feeding them into Gaia's train_model.py script.

Minimum python code to reproduce this is:

from gaia2 import *

p1 = Point()
p1.load('your/valid/JSON/.json')
print p1.layout()

Returns:

enums:
descriptors:
alastair commented 4 years ago

Related to #12?