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

feat(api): Connect new API to frontend #12

Merged
merged 43 commits into from
Dec 6, 2023
Merged

Conversation

cpvannier
Copy link
Member

@cpvannier cpvannier commented Dec 1, 2023

Description

Replace old API by updated API and connect to frontend

Fixes #14

Changes

Added

  • Select interactive segmentation models with dropdown menu based on ONNX files found in models folder
  • Select semantic search models with dropdown menu based on embeddings tables found in dataset
  • Add more explicit 404 messages in API

Changed

  • Replace old API by updated API
  • Update frontend to connect to updated API
  • Update unit tests GitHub action to install pixano-inference and test searching items with CLIP
  • Replace deprecated frontend package shortid by nanoid
  • Refactor code to successfully pass the following additional eslint rules:
    • no-undef
    • typescript-eslint/no-unsafe-assignment
    • typescript-eslint/no-unsafe-call
    • typescript-eslint/no-base-to-string

Fixed

  • Fix finding embeddings tables based on model ID in Dataset methods
  • Fix creating bounding box from mask when saving item
  • Fix adding "search distance" ItemFeature when performing semantic search
  • Visual fixes in frontend user interface

TODO: Update frontend for interactive segmentation and semantic search
Return None if embeddings of given model_id not found
Cannot return search query with get
Remove unused import
Add missing await
Look for model name inside model path instead of the other way around
Make both model name and model path lowercase to prevent case issues
Remove exception for missing pixano-inference module
Install pixano-inference in unit tests GitHub action
When loading item pages, disable loading media features like
image height and width that require opening the file metadata

Item pages now load faster
When displaying item pages in Explorer, use thumbnails
for images instead of opening them
@cpvannier cpvannier linked an issue Dec 4, 2023 that may be closed by this pull request
@cpvannier cpvannier self-assigned this Dec 4, 2023
Please run `pnpm i` to install nanoid

For more info on shortid deprecation:
https://www.npmjs.com/package/shortid
 - typescript-eslint/no-base-to-string fixed with new API,
 that allows getting item ID without looking in features

 - typescript-eslint/no-unsafe-call fixed with the following changes:
   - Refactored until() functions
   - Refactored tools (specifcally Point Selection)
   - Commented unused code in VideoCell
Fix change from 9545f65
Need to include Konva.Group and Konva.Shape to delete bboxes and masks
 - typescript-eslint/no-unsafe-assignment fixed with:
   - Add type to embeddings in Canvas2D
   - Add type to handleWheelOnImage in Canvas2D
   - Add types when loading JSON data in api.ts and npy.ts

- typescript-eslint/no-unsafe-member-access mostly fixed with:
   - Add type to handleClickOnImage in Canvas2D
   - Add type to handleKeyPress in CategoryToolbar
   - But can't add type to event.detail.evt in Canvas2D

- no-undef fixed by adding browser to env
Toggling label visibility sometimes does not work for label sources
other than Ground Truth. Hard to pinpoint the source of the issue.
@cpvannier cpvannier marked this pull request as ready for review December 5, 2023 12:34
Hide "Show remaining items only" toggle if dataset has
no active learning related columns (check for "round")
ui/apps/annotator/src/AnnotationWorkspace.svelte Outdated Show resolved Hide resolved
ui/apps/annotator/src/AnnotationWorkspace.svelte Outdated Show resolved Hide resolved
@cpvannier cpvannier added scope: api Related to Pixano API enhancement New feature or request labels Dec 6, 2023
@jrabary jrabary merged commit c31e995 into develop Dec 6, 2023
15 checks passed
@cpvannier cpvannier added this to the Pixano 0.5.0 milestone Jan 16, 2024
@cpvannier cpvannier deleted the feat/connect_api_routers branch January 31, 2024 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request scope: api Related to Pixano API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

REST API improvement - Replace existing API and connect to frontend
4 participants