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

Add Extractor description API route #878

Merged
merged 6 commits into from Feb 10, 2021
Merged

Add Extractor description API route #878

merged 6 commits into from Feb 10, 2021

Conversation

adelavega
Copy link
Collaborator

For #820 #870 need API route with descriptions for extractors.

Instead of adding to the db and over-complicating, I decided to just scrape the doc strings from Pliers and return via API. We can cache this route to ensure adequate performance.

@cypress
Copy link

cypress bot commented Feb 5, 2021



Test summary

7 0 0 0


Run details

Project Neuroscout
Status Passed
Commit 1db514b
Started Feb 10, 2021 10:25 PM
Ended Feb 10, 2021 10:25 PM
Duration 00:47 💡
OS Linux Ubuntu - 18.04
Browser Electron 87

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@codecov-io
Copy link

Codecov Report

Merging #878 (7d608c7) into master (9a0e24c) will decrease coverage by 0.17%.
The diff coverage is 64.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #878      +/-   ##
==========================================
- Coverage   84.70%   84.53%   -0.18%     
==========================================
  Files          57       59       +2     
  Lines        2858     2883      +25     
==========================================
+ Hits         2421     2437      +16     
- Misses        437      446       +9     
Impacted Files Coverage Δ
neuroscout/resources/extractor.py 55.00% <55.00%> (ø)
neuroscout/resources/__init__.py 100.00% <100.00%> (ø)
neuroscout/schemas/extractor.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9a0e24c...489aafd. Read the comment docs.

@cypress
Copy link

cypress bot commented Feb 5, 2021



Test summary

7 0 0 0


Run details

Project Neuroscout
Status Passed
Commit ff49f3a ℹ️
Started Feb 10, 2021 10:24 PM
Ended Feb 10, 2021 10:25 PM
Duration 00:45 💡
OS Linux Ubuntu - 18.04
Browser Electron 87

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@adelavega
Copy link
Collaborator Author

This is what the output looks like, what do you think @rwblair

[
  {
    "description": "Extract probability of 521 audio event classes based on AudioSet corpus using a YAMNet architecture. Code available at: https://github.com/tensorflow/models/tree/master/research/audioset/yamnet",
    "name": "AudiosetLabelExtractor"
  },
  {
    "description": "Extracts summary metrics from SeriesStim using numpy, scipy or custom functions",
    "name": "MetricExtractor"
  },
  {
    "description": "Extracts number of times each unique word has occurred within text",
    "name": "WordCounterExtractor"
  },
  {
    "description": "Gets the average luminosity of the pixels in the image",
    "name": "BrightnessExtractor"
  },
  {
    "description": "Gets the variance of color channels of the image",
    "name": "VibranceExtractor"
  },
  {
    "description": "Gets the degree of blur/sharpness of the image",
    "name": "SharpnessExtractor"
  },
  {
    "description": "Determines the saliency of the image using Itti & Koch (1998) algorithm implemented in pySaliencyMap",
    "name": "SaliencyExtractor"
  },
  {
    "description": "Uses the Clarifai API to extract tags of images.",
    "name": "ClarifaiAPIImageExtractor"
  },
  {
    "description": "Short-time Fourier Transform extractor.",
    "name": "STFTAudioExtractor"
  },
  {
    "description": "Mean amplitude extractor for blocks of audio with transcription.",
    "name": "MeanAmplitudeExtractor"
  },
  {
    "description": "Extracts the spectral centroids from audio using the Librosa library. For details on argument specification visit: https://librosa.org/doc/latest/generated/librosa.feature.spectral_centroid.html.",
    "name": "SpectralCentroidExtractor"
  },
  {
    "description": "Extracts the tonal centroids (tonnetz) from audio using the Librosa library. For details on argument specification visit: https://librosa.org/doc/latest/generated/librosa.feature.tonnetz.html.",
    "name": "TonnetzExtractor"
  },
  {
    "description": "Extracts a chromagram from an audio's waveform using the Librosa library. For details on argument specification visit: https://librosa.org/doc/latest/generated/librosa.feature.chroma_stft.html.",
    "name": "ChromaSTFTExtractor"
  },
  {
    "description": "Extracts a constant-q chromogram from audio using the Librosa library. For details on argument specification visit: https://librosa.org/doc/latest/generated/librosa.feature.chroma_cqt.html.",
    "name": "ChromaCQTExtractor"
  },
  {
    "description": "Extracts mel-scaled spectrogram from audio using the Librosa library. For details on argument specification visit: https://librosa.org/doc/latest/generated/librosa.feature.melspectrogram.html.",
    "name": "MelspectrogramExtractor"
  },
  {
    "description": "Extracts Mel Frequency Ceptral Coefficients from audio using the Librosa library. For details on argument specification visit: https://librosa.org/doc/latest/generated/librosa.feature.mfcc.html.",
    "name": "MFCCExtractor"
  },
  {
    "description": "Extracts root mean square (RMS) from audio using the Librosa library. For details on argument specification visit: https://librosa.org/doc/latest/generated/librosa.feature.rms.html.",
    "name": "RMSExtractor"
  },
  {
    "description": "Identifies faces in images using the Google Cloud Vision API.",
    "name": "GoogleVisionAPIFaceExtractor"
  },
  {
    "description": "Labels objects in images using the Google Cloud Vision API.",
    "name": "GoogleVisionAPILabelExtractor"
  },
  {
    "description": "Extracts image properties using the Google Cloud Vision API.",
    "name": "GoogleVisionAPIPropertyExtractor"
  },
  {
    "description": "Extracts safe search detection using the Google Cloud Vision API.",
    "name": "GoogleVisionAPISafeSearchExtractor"
  },
  {
    "description": "Uses nltk's VADER lexicon to extract (0.0-1.0) values for the positve, neutral, and negative sentiment of a TextStim. Also returns a compound score ranging from -1 (very negative) to +1 (very positive).",
    "name": "VADERSentimentExtractor"
  },
  {
    "description": "Extracts total amount of dense optical flow between every pair of video frames.",
    "name": "FarnebackOpticalFlowExtractor"
  },
  {
    "description": "Extracts the length of the text in characters.",
    "name": "LengthExtractor"
  },
  {
    "description": "A generic Extractor that maps words onto values via one or more pre-defined dictionaries accessed via the web.",
    "name": "PredefinedDictionaryExtractor"
  },
  {
    "description": "Base ComplexTextStim Extractor class; all subclasses can only be applied to ComplexTextStim instance.",
    "name": "ComplexTextExtractor"
  },
  {
    "description": "Extracts shot changes using the Google Video Intelligence API",
    "name": "GoogleVideoAPIShotDetectionExtractor"
  }
]

@adelavega
Copy link
Collaborator Author

@tyarkoni what do you think? I wanted to avoid over complicating our db, and doing annoying migrations just to be able to add this information. It seems that if we keep it all in pliers, it also incentives us to have a good description in only one place.

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.

None yet

2 participants