## oss_png_transfer 라이브러리
`oss_png_transfer` : MINIST 데이터셋을 기반으로 PNG 파일 읽기(only grayscale), 데이터 전처리, 간단한 MLP 모델 학습을 해볼 수 있는 Python 라이브러리 입니다.
### 기능
1. **PNGProcessor.py**:
- PNG 파일의 데이터 여는 기능.
- 흑백(그레이스케일) 이미지 색상 반전.
- (JPG는 추후 업데이트 예정)
2. **DataPreProcessor.py**:
- 데이터 섞기, train, test 데이터 분리
- 섞는 과정에서 시드 값(seed = 42)를 설정하면 동일한 결과를 낼 수 있습니다.
- 기본 train, test 분할 비율은 7:3 이고, 개별 정의 가능합니다.
- OneHot 인코딩
- 숫자형 라벨(예: 0, 1, 2)을 One-hot 벡터 형식으로 변환한다.
- ex) [0, 1, 2] → [[1, 0, 0], [0, 1, 0], [0, 0, 1]]
- 데이터 정규화
- 데이터 최소값과 최댓값 기준으로 0~1범위로 정규화한다.
- 모든 값이 동일할 경우, 예외처리로 모든 데이터가 0.5로 설정된다.
3. **MLPForMINIST.py**:
- 입력층, 은닉층, 출력층의 노드 개수 설정.
- 은닉층은 한겹으로 고정
- 반복횟수(epoch = 1000), 학습률(learning_rate = 0.1) 설정가능
- 모델 파라미터 저장/불러오기 지원.
-> 학습시킨 이후 모델을 저장하고, 파라미터를 불러와서 model.forward()로 이미지 예측할 수 있음
## 설치
```bash
pip install oss_png_transfer
Raw data
{
"_id": null,
"home_page": "https://github.com/your_username/oss_png_transfer",
"name": "oss-png-transfer",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "\uc774\uc900\uba85",
"author_email": "your_email@example.com",
"download_url": null,
"platform": null,
"description": "## oss_png_transfer \ub77c\uc774\ube0c\ub7ec\ub9ac\r\n\r\n`oss_png_transfer` : MINIST \ub370\uc774\ud130\uc14b\uc744 \uae30\ubc18\uc73c\ub85c PNG \ud30c\uc77c \uc77d\uae30(only grayscale), \ub370\uc774\ud130 \uc804\ucc98\ub9ac, \uac04\ub2e8\ud55c MLP \ubaa8\ub378 \ud559\uc2b5\uc744 \ud574\ubcfc \uc218 \uc788\ub294 Python \ub77c\uc774\ube0c\ub7ec\ub9ac \uc785\ub2c8\ub2e4.\r\n\r\n### \uae30\ub2a5\r\n1. **PNGProcessor.py**:\r\n - PNG \ud30c\uc77c\uc758 \ub370\uc774\ud130 \uc5ec\ub294 \uae30\ub2a5.\r\n - \ud751\ubc31(\uadf8\ub808\uc774\uc2a4\ucf00\uc77c) \uc774\ubbf8\uc9c0 \uc0c9\uc0c1 \ubc18\uc804.\r\n - (JPG\ub294 \ucd94\ud6c4 \uc5c5\ub370\uc774\ud2b8 \uc608\uc815)\r\n\r\n2. **DataPreProcessor.py**:\r\n - \ub370\uc774\ud130 \uc11e\uae30, train, test \ub370\uc774\ud130 \ubd84\ub9ac\r\n - \uc11e\ub294 \uacfc\uc815\uc5d0\uc11c \uc2dc\ub4dc \uac12(seed = 42)\ub97c \uc124\uc815\ud558\uba74 \ub3d9\uc77c\ud55c \uacb0\uacfc\ub97c \ub0bc \uc218 \uc788\uc2b5\ub2c8\ub2e4.\r\n - \uae30\ubcf8 train, test \ubd84\ud560 \ube44\uc728\uc740 7:3 \uc774\uace0, \uac1c\ubcc4 \uc815\uc758 \uac00\ub2a5\ud569\ub2c8\ub2e4.\r\n\r\n - OneHot \uc778\ucf54\ub529\r\n - \uc22b\uc790\ud615 \ub77c\ubca8(\uc608: 0, 1, 2)\uc744 One-hot \ubca1\ud130 \ud615\uc2dd\uc73c\ub85c \ubcc0\ud658\ud55c\ub2e4.\r\n - ex) [0, 1, 2] \u2192 [[1, 0, 0], [0, 1, 0], [0, 0, 1]]\r\n \r\n - \ub370\uc774\ud130 \uc815\uaddc\ud654\r\n - \ub370\uc774\ud130 \ucd5c\uc18c\uac12\uacfc \ucd5c\ub313\uac12 \uae30\uc900\uc73c\ub85c 0~1\ubc94\uc704\ub85c \uc815\uaddc\ud654\ud55c\ub2e4.\r\n - \ubaa8\ub4e0 \uac12\uc774 \ub3d9\uc77c\ud560 \uacbd\uc6b0, \uc608\uc678\ucc98\ub9ac\ub85c \ubaa8\ub4e0 \ub370\uc774\ud130\uac00 0.5\ub85c \uc124\uc815\ub41c\ub2e4.\r\n\r\n3. **MLPForMINIST.py**:\r\n - \uc785\ub825\uce35, \uc740\ub2c9\uce35, \ucd9c\ub825\uce35\uc758 \ub178\ub4dc \uac1c\uc218 \uc124\uc815.\r\n - \uc740\ub2c9\uce35\uc740 \ud55c\uacb9\uc73c\ub85c \uace0\uc815\r\n - \ubc18\ubcf5\ud69f\uc218(epoch = 1000), \ud559\uc2b5\ub960(learning_rate = 0.1) \uc124\uc815\uac00\ub2a5\r\n - \ubaa8\ub378 \ud30c\ub77c\ubbf8\ud130 \uc800\uc7a5/\ubd88\ub7ec\uc624\uae30 \uc9c0\uc6d0.\r\n -> \ud559\uc2b5\uc2dc\ud0a8 \uc774\ud6c4 \ubaa8\ub378\uc744 \uc800\uc7a5\ud558\uace0, \ud30c\ub77c\ubbf8\ud130\ub97c \ubd88\ub7ec\uc640\uc11c model.forward()\ub85c \uc774\ubbf8\uc9c0 \uc608\uce21\ud560 \uc218 \uc788\uc74c\r\n\r\n## \uc124\uce58\r\n```bash\r\npip install oss_png_transfer\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A package for PNG transfer and processing",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/your_username/oss_png_transfer"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8e876e71ab61cc6de736a55b46f6b503cb433b9a7c752265576d05bae116f823",
"md5": "868b634c70ed6b407e8a8b53263fcb3f",
"sha256": "64f2e4ee2c05d261afd756fc945986f28267077961757ca8a6d4e241f55f1483"
},
"downloads": -1,
"filename": "oss_png_transfer-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "868b634c70ed6b407e8a8b53263fcb3f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 7403,
"upload_time": "2024-12-08T04:45:46",
"upload_time_iso_8601": "2024-12-08T04:45:46.051138Z",
"url": "https://files.pythonhosted.org/packages/8e/87/6e71ab61cc6de736a55b46f6b503cb433b9a7c752265576d05bae116f823/oss_png_transfer-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-08 04:45:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "your_username",
"github_project": "oss_png_transfer",
"github_not_found": true,
"lcname": "oss-png-transfer"
}