1. 18 Aug, 2020 1 commit
    • Manoj Plakal's avatar
      Added TF-Lite-compatible feature extractor and model exporter for YAMNet (#9098) · 8da48573
      Manoj Plakal authored
      * Added TF-Lite-compatible feature extractor and model exporter for YAMNet.
      
      - Added a TF-Lite compatible feature extractor. With the latest TF-Lite,
        that involves a DFT-multiplication replacement for tf.abs(tf.signal.stft())
        and not a lot else. Note that TF-Lite now allows variable-length inputs.
      - Added a YAMNet exporter that produces TF2 SavedModels, TF-Lite models,
        and TF-JS models.
      - Cleanups: switched hyperparameters to a dataclass, got rid of
        some lingering cruft in yamnet_test.
      
      * Responded to DAn's comments in https://github.com/tensorflow/models/pull/9098
      
      - Switched some hparams to float
      - Made class map asset available on the exported model, and tested that
        it can be loaded from the various exports.
      8da48573
  2. 12 Aug, 2020 1 commit
    • Manoj Plakal's avatar
      Input/Output tweaks for YAMNet and VGGish. (#9092) · 9b179e8e
      Manoj Plakal authored
      * Input/Output tweaks for YAMNet and VGGish.
      
      - Waveform input for YAMNet is now padded so that we get at least
        one patch of log mel spectrogram. The VGGish TF-Hub exporter
        uses YAMNet's feature computation so the VGGish export will
        also pad waveform input similarly.
      - Added a 1024-D embedding output to YAMNet so we now produce
        predicted scores, log mel spectrogram features, and embeddings,
        to satisfy a variety of uses: class prediction, acoustic
        feature visualization, semantic feature extraction.
      - Simplified usage of YAMNet in inference mode. Instead of trying
        to work around implicit batch size issues in the Model.predict()
        API, we simply __call__() the Model.
      - Switched inference.py to TF 2 and Eager execution.
      - Updated the visualization notebook: now uses TF2/Eager and
        can be loaded and run in Google Colab.
      
      * Responded to DAn's comments in https://github.com/tensorflow/models/pull/9092
      
      - Merged spectrogram computation and framing into a single function
        that returns both spectrogram and framed features.
      - Extended waveform padding to pad up to an integral number of hops
        in addition to the final STFT analysis window.
      9b179e8e
  3. 21 Nov, 2019 1 commit