Skip to main content

Classify SPU product images by mother/reference images and output ordered SKU image sets.

Project description

SPU SKU Images

按母图对 SPU 产品图进行 SKU 分类,并输出适合电商上架的 SKU 图片排序。

安装

在项目目录运行:

python -m pip install .

开发调试时可以用可编辑安装:

python -m pip install -e .

最简使用

如果当前目录下有:

母图/
spu-2/

直接运行:

sku-images spu-2

也可以用短别名:

sku-spu spu-2

默认输出到:

sku_output/spu-2_年月日_时分秒/

指定母图和输出目录

sku-images spu-2 --mother 母图 --out result_001

不把母图放进最终排序图集

sku-images spu-2 --no-include-mother-main

兼容旧脚本方式

python .\scripts\sku_image_pipeline.py spu-2 --mother 母图 --out result_001

发布到 PyPI

先跑测试:

python -m unittest discover -s tests -p "test_*.py"

构建发布包:

python -m pip install --user --upgrade build twine
python -m build --outdir dist_pypi
python -m twine check .\dist_pypi\*

上传到正式 PyPI:

$env:TWINE_USERNAME="__token__"
$env:TWINE_PASSWORD="pypi-你的token"
python -m twine upload .\dist_pypi\*

发布后安装:

python -m pip install spu-sku-images

输出内容

result_001/
  spu-2_by_mother/
    classification_manifest.csv
    classification_preview.jpg

  spu-2_sku_best_order/
    best_order_manifest.csv
    best_order_preview.jpg

脚本默认不会清空旧目录。如果输出目录已有内容,会停止并提示换一个 --out

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

spu_sku_images-0.1.0.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spu_sku_images-0.1.0-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file spu_sku_images-0.1.0.tar.gz.

File metadata

  • Download URL: spu_sku_images-0.1.0.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for spu_sku_images-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d1689cec96aeefaf4cace5d152c6c31d576b56b746e1f13654e12fed42d0ab0e
MD5 aec7982dd59ea52dc0522a2d39525f23
BLAKE2b-256 9e37c0373a141a4e60ecc7443dc4e0e9d200ec7cde7e1951e94fa8bc1775a4b6

See more details on using hashes here.

File details

Details for the file spu_sku_images-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: spu_sku_images-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for spu_sku_images-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f341e1e1a49d651abc5832c6ac881ec86a627c0ff12d51bf4bb6b614a17b1b3
MD5 f73d0aa52dc3bbbbb1ce3d958066f8d9
BLAKE2b-256 2c7e1ee1e923f27b58d579643a6269d32fe72409144dbff4682d04c56fa9fc93

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