convert-annotations
Bases: FileOperation
Source code in file_operations/convert_annotations.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | |
__init__(settings, **kwargs)
Sets up the tool to change annotation formats.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings
|
AppSettings
|
The default settings for the app. |
required |
**kwargs
|
dict
|
Extra options for the task. It includes: pattern: The starting format (like 'voc' or 'yolo'). destination_type: The new format you want. img_path: Where the images are located. n_jobs: How many tasks to run at the same time. |
{}
|
Source code in file_operations/convert_annotations.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | |
add_arguments(settings, parser)
staticmethod
Adds the necessary options to the command line tool.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings
|
AppSettings
|
The main settings for the app. |
required |
parser
|
ArgumentParser
|
The tool that reads command line options. |
required |
Source code in file_operations/convert_annotations.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | |
do_task()
Starts the conversion of the annotation files
Source code in file_operations/convert_annotations.py
83 84 85 | |