Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial nabat models/api script #122

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

initial nabat models/api script #122

wants to merge 6 commits into from

Conversation

BryonLewis
Copy link
Collaborator

@BryonLewis BryonLewis commented Feb 4, 2025

resolves #121

  • Creates new /nabat under /models for nabat specific models
    • AcousticBatch -> Recording
    • NaBatSpectrogram -> Spectrogram
    • NaBatCompressedSpectrogram -> CompressedSpectrogram
  • Added a sample script to read from the NaBat GraphQL API
  • Under ./tasks/nabat/ added a tasks.py and a nabat_data_retrieval.py
    • The nabat_data_retrieval has a main acoustic_batch_initialize that does:
      • Using the ApiToken and BatchId it requests some basic information about the NaBat file for the batchId
      • Using a ProjectId and the filename it requests a presigned S3 URL for downloading the file
      • Downloads the wav file
      • Creates an AcousticBatch using the metadata that we have
      • Using the downloaded audio file it generates a spectrogram
      • From the spectrogram it generates a compressed spectrogram
      • Then it runs the prediction on the compressed spectrogram and logs the results

TODO:

  • Client Side
    • New endpoint that is used for nabat data
      • Takes in the URL API Key and BatchID
      • Uses this information to create an AcousticBatch with the information
      • After creation of the AcousticBatch it should download the audio file and create the spectrogram and compressed spectrogram
      • Finally it should run the AutoId onnx model we are using
    • The UI for NaBat spectrograms will need to be created, this is a separate from the default one
      • Mostly the pulse and sequence annotations won't exist
      • The API will need a new /nabat header for getting information
  • Back-End
    • /nabat URLs for getting information about AcousticBatch, Spectrograms and CompressedSpectrograms
    • Logic for getting a presigned URL for download that can be used to generate spectrograms and perform inference
    • Updating inference logic to properly use the new API for calculation
    • PROJECTID is static and needs to be retrieved using the batchId.
    • Better logging of the progress of downloading/processing/conversion (This may be a separate PR).

Think about user permissions and authentication and if there will be a passing of authentication to the system. We need to determine if the spectrograms need to be limited like the acoustic file is using the APIToken. So there may be some syncing of users between the systems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NABat Integration Support
1 participant