caraxes/try-on
Composer 安装命令:
composer require caraxes/try-on
包简介
A Laravel package for try-on processing.
README 文档
README
Welcome to the Try-On Laravel Package! 🚀 This package allows you to process virtual try-on requests with ease using external services.
⚠️ Prerequisite
This package relies on the Fal.AI Try-On API (Fal.AI Try-On) for processing virtual try-on requests. To use this package, you must have access to the Fal.AI API. Please ensure you have registered for an API key and have the necessary credentials before proceeding with the installation.
📦 Installation
You can install the package via Composer:
composer require caraxes/try-on
Then, publish the configuration file:
php artisan vendor:publish --tag=config --provider="TryOn\Providers\TryOnServiceProvider"
⚙️ Configuration
Add the required environment variables to your .env file:
CATEGORY_IDENTIFIER_API=<your_api_url> CATEGORY_IDENTIFIER_TOKEN=<your_token> TRY_ON_SERVICE_TOKEN=<your_token> TRY_ON_SERVICE_API=<your_api_url>
Ensure that the TRY_ON_SERVICE_API variable points to the Fal.AI Try-On API.
🚀 Usage
Getting Clothing Category
Use the TryOnRepository to classify a clothing item:
$repository = app(\TryOn\Repositories\TryOnRepository::class); $category = $repository->getCategory('T-shirt'); echo $category; // Outputs: tops, bottoms, or one-pieces
Virtual Try-On
To process a try-on request:
$parameters = [ 'message' => [ 'productTitle' => 'Jeans', 'image' => 'https://example.com/model.jpg', 'productImage' => 'https://example.com/jeans.jpg' ] ]; $result = $repository->tryOn(1, $parameters); print_r($result);
🛠️ Features
✅ Classifies clothing into categories (tops, bottoms, one-pieces)
✅ Sends images for virtual try-on processing
✅ Retrieves and tracks the try-on process status
✅ Stores results in the database asynchronously
🏗 Running Migrations
php artisan migrate
🏗 Queue Processing
To handle speech recognition requests asynchronously:
php artisan queue:work
📜 License
This package is open-source and licensed under the MIT License. 🎉
🤝 Contributing
Contributions are welcome! Feel free to submit issues or pull requests. Let's make virtual try-ons better together! 💡
📞 Support
For support, please open an issue on GitHub or contact me personally via email at amirmahdifor@gmail.com.
caraxes/try-on 适用场景与选型建议
caraxes/try-on 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 50 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 02 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 caraxes/try-on 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 caraxes/try-on 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 50
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-02-24