Skip to content

Cannot add landmark on an image with no existing landmarks #72

@e-platini

Description

@e-platini

Edit: This actually has nothing to do with yaml import. See #76

With the landmark annotations, untested with other styles of annotations.

Branch with the import task button:
https://github.com/smistad/annotationweb/tree/feature/import-task

When using the "Import tasks & datasets" functionality and importing a YAML file, if there is no "landmark" object associated with an image, it will be impossible to annotate that image.

When opening the image for annotation, whether from the image list or from clicking on "continue annotation", either of those things will happen:

  • The layout of the page loads but the image does not load
  • The image loads, but when clicking on it to annotate, it does not create a landmark

When clicking on "Save" or "Reject" in such case, it will display an error message top left of the screen:

Save failed
'0'

Here is a very simple yaml file you can import to reproduce the bug (just replace the path to the image):

- model: annotationweb.dataset
  pk: $annotationweb$dataset$1$
  fields:
    name: 'test_no_landmark'
- model: 'annotationweb.label'
  'pk': 1
  fields:
    name: "Lymphocyte"
- model: annotationweb.task
  pk: $annotationweb$task$1$
  fields:
    name: 'test_no_landmark'
    type: landmark
    dataset:
    - $annotationweb$dataset$1$
    label: [1]
    auto_play: false
    show_entire_sequence: true
    large_image_layout: true
- model: annotationweb.subject
  pk: $annotationweb$subject$1$
  fields:
    name: '1'
    dataset: $annotationweb$dataset$1$
- model: annotationweb.imagesequence
  pk: $annotationweb$imagesequence$1$
  fields:
    format: C:\your_path_to_a_random_image\image.png
    subject: $annotationweb$subject$1$
    nr_of_frames: 1
    start_frame_nr: 0
- model: annotationweb.imageannotation
  pk: $annotationweb$imageannotation$1$
  fields:
    image: $annotationweb$imagesequence$1$
    task: $annotationweb$task$1$
    finished: false
    user: 1
    date: 2024-04-22 16:27:04.580249
    rejected: false
- model: annotationweb.keyframeannotation
  pk: $annotationweb$keyframeannotation$1$
  fields:
    frame_nr: 0
    image_annotation: $annotationweb$imageannotation$1$

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions