Skip to main content

load image easily

Project description

  • 組み合わせが必要な場合(一つの画像を入力として複数の教師信号が1になる場合)は使えません

  • zipなどを展開せず読めます

使い方

>>> from image2pyarray import Image2PyArray
>>> i2pa = Image2PyArray()
>>> (X_train,Y_train),(X_test, Y_test) = i2pa.from_dir("/path/to/dir");
>>> (X_train,Y_train),(X_test, Y_test) = i2pa.from_zip("/path/to/file.zip");
...

Tree

  • train, testは両方必要

  • classname_1, 1.jpgなどは特に名前に制限なし

  • train, test 以下のディレクトリ名は全て一致する必要がある

  • zipでも同様に、zipのルート直下にtrain, testが両方必要

dirname
 |
 |-train
 |  |
 |  |-classname_1
 |  |  |
 |  |  |-1.jpg
 |  |  |-2.jpg
 |  |  :
 |  |  `-l.jpg
 |  |
 |  |-classname_2
 |  |  |
 |  |  |-1.jpg
 |  |  |-2.jpg
 |  |  :
 |  |  `-m.jpg
 |  :
 |  `-classname_k
 |     |
 |     |-1.jpg
 |     |-2.jpg
 |     :
 |     `-n.jpg
 |
 `-test
    |
    |-classname_1
    |  |
    |  |-1.jpg
    |  |-2.jpg
    |  :
    |  `-p.jpg
    |
    |-classname_2
    |  |
    |  |-1.jpg
    |  |-2.jpg
    |  :
    |  `-q.jpg
    :
    `-classname_k
       |
       |-1.jpg
       |-2.jpg
       :
       `-r.jpg

機能

  • directory

  • zip

  • (HTTP)

  • (tar)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

image2pyarray-0.0.7.tar.gz (3.7 kB view details)

Uploaded Source

File details

Details for the file image2pyarray-0.0.7.tar.gz.

File metadata

  • Download URL: image2pyarray-0.0.7.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for image2pyarray-0.0.7.tar.gz
Algorithm Hash digest
SHA256 5af129a87b2f3cb127aa7b0db1aaed929684fc754b172a64715c7d4a49826d5c
MD5 1de8d3f6e722c4cc271500869a4e0d9c
BLAKE2b-256 d71de55ba381e01cf17d4541927d8733d3b3e53abf72389b002a28f33cb05181

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page