echoss-image-utils


Nameechoss-image-utils JSON
Version 0.1.2 PyPI version JSON
download
home_pageNone
Summaryechoss AI Bigdata Solution - image utils[image dataset split, labelme2yolo format]
upload_time2024-06-10 06:50:24
maintainerNone
docs_urlNone
authorincheolshin
requires_python>3.7
licenseNone
keywords echoss echoss_image_utils labelme2yolo labelme yolo
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # **labelme2yolo**

## 소개

labelme를 이용하여 어노테이션 작업을 한 josn파일을 yolo학습이 가능하도록 txt파일로 변환해주는 기능

## 사용법
Commad line
```
    python labelme2yolo.py --json_dir=<s3데이터를 사용한다면 None, 아니면 json파일들이 있는 폴더 경로> --s3_data=<s3데이터를 사용하는지 아닌지에대한 bool값>\
    --s3_yaml=<s3접속 정보가 담긴 .yaml파일의 경로>  --json_db_table=<사용하려는 json 데이터 베이스의 테이블 명>
```
--s3_data에 입력되는 .yaml파일의 양식 및 필수 키 값
```
    # labelme2yolo config
    db_region: 'kr_local'
    image_data_path: images/bb_seg_data/
    json_data_path: json_labels/bb_seg_data/
    yolo_data_path: yolo_labels/bb_seg_data/
    detect_save_path: 'results/'

    # s3 config
    s3: True  # True or False

    bucket: 'bucket-name'
    endpoint_url: 'https://kr.object.ncloudstorage.com'
    region_name: 'kr-standard'
    access_key: 'access-key'
    access_token: 'secret-token-key'
```

## 사용 예시
.59 서버에서 작동 시
```
    cd jupyter_notebooks/image_utils
    
    python labelme2yolo.py --json_dir=None --s3_data=True --s3_yaml=../data/45_abalone_data/yolo_data/ai_solution_dataset_test.yaml --json_db_table='p1_json_info'

```


# **img_dataset_split**

## 소개
어노테이션 작업이 완료 된 json 혹은 txt 파일을 기준으로 Train, Validation, Test를 원하는 비율에 맞게 나누어서 목록을 생성해주는 기능

## 사용법
Commad line
```
    python img_dataset_split.py --yaml_file_path=<s3접속 정보가 담긴 .yaml파일의 경로> --ratio=<train,val,test 비율 기입 예) 8,1,1 > \
    --db_config_file_path=<db 접속정보가 담긴 config파일 경로> --save_path=<저장하고 싶은 경로 및 이름> --random_seed=55 \
    --json_db_table=<json data의 정보가 있는 테이블 명> --image_db_table=<image data의 정보가 있는 테이블 명> --use_s3=<s3데이터를 사용하는지 아닌지에대한 bool값>
```

--yaml_file_path 입력되는 .yaml파일의 양식 및 필수 키 값
```
    # labelme2yolo config
    db_region: 'kr_local'

    # s3 config
    s3: True  # True or False

    bucket: 'bucket-name'
    endpoint_url: 'https://kr.object.ncloudstorage.com'
    region_name: 'kr-standard'
    access_key: 'access-key'
    access_token: 'secret-token-key'
```
```

## 사용 예시
.59 서버에서 작동 시
```
    cd jupyter_notebooks/image_utils
    
    python img_dataset_split.py --yaml_file_path=../data/45_abalone_data/yolo_data/ai_solution_dataset_test.yaml --ratio=8,1,1 \
    --db_config_file_path=../echoss_query/config/config.yaml --save_path=split_dataset_list.json --random_seed=55 \
    --json_db_table=p1_json_info --image_db_table=p1_image_info --use_s3=True
```

내부 함수를 직접사용하고자 할 때
```
    sd = SplitDataset(<solution config yaml file path>, (8,1,1), <db config yaml file path>, <json data db table>, <image data db table>, True or False)
    
    sd.save_data_split_json(<save file path>, <random seed : int>)
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "echoss-image-utils",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">3.7",
    "maintainer_email": null,
    "keywords": "echoss, echoss_image_utils, labelme2yolo, labelme, yolo",
    "author": "incheolshin",
    "author_email": "incheolshin@12cm.co.kr",
    "download_url": "https://files.pythonhosted.org/packages/8c/c7/b75559407cce85321280e087a23de883191f6038e5efe628f6f939f9abac/echoss_image_utils-0.1.2.tar.gz",
    "platform": null,
    "description": "# **labelme2yolo**\n\n## \uc18c\uac1c\n\nlabelme\ub97c \uc774\uc6a9\ud558\uc5ec \uc5b4\ub178\ud14c\uc774\uc158 \uc791\uc5c5\uc744 \ud55c josn\ud30c\uc77c\uc744 yolo\ud559\uc2b5\uc774 \uac00\ub2a5\ud558\ub3c4\ub85d txt\ud30c\uc77c\ub85c \ubcc0\ud658\ud574\uc8fc\ub294 \uae30\ub2a5\n\n## \uc0ac\uc6a9\ubc95\nCommad line\n```\n    python labelme2yolo.py --json_dir=<s3\ub370\uc774\ud130\ub97c \uc0ac\uc6a9\ud55c\ub2e4\uba74 None, \uc544\ub2c8\uba74 json\ud30c\uc77c\ub4e4\uc774 \uc788\ub294 \ud3f4\ub354 \uacbd\ub85c> --s3_data=<s3\ub370\uc774\ud130\ub97c \uc0ac\uc6a9\ud558\ub294\uc9c0 \uc544\ub2cc\uc9c0\uc5d0\ub300\ud55c bool\uac12>\\\n    --s3_yaml=<s3\uc811\uc18d \uc815\ubcf4\uac00 \ub2f4\uae34 .yaml\ud30c\uc77c\uc758 \uacbd\ub85c>  --json_db_table=<\uc0ac\uc6a9\ud558\ub824\ub294 json \ub370\uc774\ud130 \ubca0\uc774\uc2a4\uc758 \ud14c\uc774\ube14 \uba85>\n```\n--s3_data\uc5d0 \uc785\ub825\ub418\ub294 .yaml\ud30c\uc77c\uc758 \uc591\uc2dd \ubc0f \ud544\uc218 \ud0a4 \uac12\n```\n    # labelme2yolo config\n    db_region: 'kr_local'\n    image_data_path: images/bb_seg_data/\n    json_data_path: json_labels/bb_seg_data/\n    yolo_data_path: yolo_labels/bb_seg_data/\n    detect_save_path: 'results/'\n\n    # s3 config\n    s3: True  # True or False\n\n    bucket: 'bucket-name'\n    endpoint_url: 'https://kr.object.ncloudstorage.com'\n    region_name: 'kr-standard'\n    access_key: 'access-key'\n    access_token: 'secret-token-key'\n```\n\n## \uc0ac\uc6a9 \uc608\uc2dc\n.59 \uc11c\ubc84\uc5d0\uc11c \uc791\ub3d9 \uc2dc\n```\n    cd jupyter_notebooks/image_utils\n    \n    python labelme2yolo.py --json_dir=None --s3_data=True --s3_yaml=../data/45_abalone_data/yolo_data/ai_solution_dataset_test.yaml --json_db_table='p1_json_info'\n\n```\n\n\n# **img_dataset_split**\n\n## \uc18c\uac1c\n\uc5b4\ub178\ud14c\uc774\uc158 \uc791\uc5c5\uc774 \uc644\ub8cc \ub41c json \ud639\uc740 txt \ud30c\uc77c\uc744 \uae30\uc900\uc73c\ub85c Train, Validation, Test\ub97c \uc6d0\ud558\ub294 \ube44\uc728\uc5d0 \ub9de\uac8c \ub098\ub204\uc5b4\uc11c \ubaa9\ub85d\uc744 \uc0dd\uc131\ud574\uc8fc\ub294 \uae30\ub2a5\n\n## \uc0ac\uc6a9\ubc95\nCommad line\n```\n    python img_dataset_split.py --yaml_file_path=<s3\uc811\uc18d \uc815\ubcf4\uac00 \ub2f4\uae34 .yaml\ud30c\uc77c\uc758 \uacbd\ub85c> --ratio=<train,val,test \ube44\uc728 \uae30\uc785 \uc608) 8,1,1 > \\\n    --db_config_file_path=<db \uc811\uc18d\uc815\ubcf4\uac00 \ub2f4\uae34 config\ud30c\uc77c \uacbd\ub85c> --save_path=<\uc800\uc7a5\ud558\uace0 \uc2f6\uc740 \uacbd\ub85c \ubc0f \uc774\ub984> --random_seed=55 \\\n    --json_db_table=<json data\uc758 \uc815\ubcf4\uac00 \uc788\ub294 \ud14c\uc774\ube14 \uba85> --image_db_table=<image data\uc758 \uc815\ubcf4\uac00 \uc788\ub294 \ud14c\uc774\ube14 \uba85> --use_s3=<s3\ub370\uc774\ud130\ub97c \uc0ac\uc6a9\ud558\ub294\uc9c0 \uc544\ub2cc\uc9c0\uc5d0\ub300\ud55c bool\uac12>\n```\n\n--yaml_file_path \uc785\ub825\ub418\ub294 .yaml\ud30c\uc77c\uc758 \uc591\uc2dd \ubc0f \ud544\uc218 \ud0a4 \uac12\n```\n    # labelme2yolo config\n    db_region: 'kr_local'\n\n    # s3 config\n    s3: True  # True or False\n\n    bucket: 'bucket-name'\n    endpoint_url: 'https://kr.object.ncloudstorage.com'\n    region_name: 'kr-standard'\n    access_key: 'access-key'\n    access_token: 'secret-token-key'\n```\n```\n\n## \uc0ac\uc6a9 \uc608\uc2dc\n.59 \uc11c\ubc84\uc5d0\uc11c \uc791\ub3d9 \uc2dc\n```\n    cd jupyter_notebooks/image_utils\n    \n    python img_dataset_split.py --yaml_file_path=../data/45_abalone_data/yolo_data/ai_solution_dataset_test.yaml --ratio=8,1,1 \\\n    --db_config_file_path=../echoss_query/config/config.yaml --save_path=split_dataset_list.json --random_seed=55 \\\n    --json_db_table=p1_json_info --image_db_table=p1_image_info --use_s3=True\n```\n\n\ub0b4\ubd80 \ud568\uc218\ub97c \uc9c1\uc811\uc0ac\uc6a9\ud558\uace0\uc790 \ud560 \ub54c\n```\n    sd = SplitDataset(<solution config yaml file path>, (8,1,1), <db config yaml file path>, <json data db table>, <image data db table>, True or False)\n    \n    sd.save_data_split_json(<save file path>, <random seed : int>)\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "echoss AI Bigdata Solution - image utils[image dataset split, labelme2yolo format]",
    "version": "0.1.2",
    "project_urls": null,
    "split_keywords": [
        "echoss",
        " echoss_image_utils",
        " labelme2yolo",
        " labelme",
        " yolo"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4902a4f7f0838a81351ca3e0aac234429992fef79c34bc5d46c08ab80f4a43d1",
                "md5": "75089065d723153bdcbf54317e5f99e0",
                "sha256": "298538d2cdb5c4268846a8a4a65cc92156fcc6e64df71a86850b66967267132d"
            },
            "downloads": -1,
            "filename": "echoss_image_utils-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "75089065d723153bdcbf54317e5f99e0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">3.7",
            "size": 16178,
            "upload_time": "2024-06-10T06:50:23",
            "upload_time_iso_8601": "2024-06-10T06:50:23.124901Z",
            "url": "https://files.pythonhosted.org/packages/49/02/a4f7f0838a81351ca3e0aac234429992fef79c34bc5d46c08ab80f4a43d1/echoss_image_utils-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8cc7b75559407cce85321280e087a23de883191f6038e5efe628f6f939f9abac",
                "md5": "14a3c14b19bec7725c2f0ee5d59cb347",
                "sha256": "b5e8929196bd6c3fb0937219473685306b1d219ca096d677dfd25d121d9cf38c"
            },
            "downloads": -1,
            "filename": "echoss_image_utils-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "14a3c14b19bec7725c2f0ee5d59cb347",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">3.7",
            "size": 13193,
            "upload_time": "2024-06-10T06:50:24",
            "upload_time_iso_8601": "2024-06-10T06:50:24.403391Z",
            "url": "https://files.pythonhosted.org/packages/8c/c7/b75559407cce85321280e087a23de883191f6038e5efe628f6f939f9abac/echoss_image_utils-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-10 06:50:24",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "echoss-image-utils"
}
        
Elapsed time: 2.78423s