alezanai / term-annotator

Super-fast image annotation using terminal and keyboard
0 stars 0 forks source link

Modify Output Directory #20

Closed TaniaPash closed 4 years ago

TaniaPash commented 4 years ago

Actual

The Output directory (dir were stored all annotated files) is hardcoded in a config file.

Expected

The Output directory should be stored in same folder as the source directory. see an example below: -> gifs-to-annotate/ -> gifs-to-annotate/toannotate -> gifs-to-annotated/annotated

Workflow to implement

• The zip will be like <dataset>.zip/toannotate/ • Once unzipped it will be like <folder>/toannotate/ ... • The user will have to select <folder> as source instead of <folder>/toannotate • If the source folder does not contain any toannotate -> raise an error Dataset structure is not valid, Please check documentation • If the source folder contains toannotate folder then check if an annotated folder exists • If annotated folder does not exists, create it in <folder>/annotated/ • Use this <folder>/annotated/ as annotation destination (instead of config file)

Also, after this first step is done, do a sanity check on the database (this include toannotate vs annotated but also files inside annotated folder):

• list all the files in all the source and dest directories • Make sure that the files names are all unique • If not raise an error Dataset is corrupted, duplicated files, please contact administrator

piercus commented 4 years ago

Hello Tania,

I think this is a good idea, anyway, "toannotate" and "annotated" should not be hard-coded in term-annotator.

I suggest you add 2 fields into the term-annotator configuration :

If "sourceSubDir" does not exists, then term-annotor will use directly as source dir If "sourceSubDir" exists in config but not in the selected source folder -> raise an error Dataset structure is not valid, Please check documentation

Same behavior for "destSubDir" folder

TaniaPash commented 4 years ago

hi @smitajha

Could you please test a new data-set structure?

Description

  1. a new data-set structure: <data-set.zip>/annotated

see https://github.com/teamklap/wiki/pull/980

  1. config is updated to use:
    • as source data-set/toannotate
    • as destination data-set/annotated

The User should choose the main folder (data-set) as the source directory to start annotation.

Steps:

  1. load annotation dataset <data-set.zip> (shared below)
  2. unzip to data-set (folder)
  3. start app
  4. import Config File (shared below)
  5. choose SOURCE DIR : data-set (folder)
  6. Annotated ~20 images
  7. Check if Files are stored inside data-set-name/annotated folder

Data:

Expected

  1. The user is able to use as source folder only main folder data-set of the unzipped annotation data set
  2. Correct test data: Annotated files are stored inside data-set/annotated/ folder
  3. Corrupted test data: User get Error Dataset structure is not valid, Please check documentation
TaniaPash commented 4 years ago

done. closing