{"id":42832211,"url":"https://github.com/lygitdata/garmentiq","last_synced_at":"2026-04-16T06:00:33.857Z","repository":{"id":287260956,"uuid":"945846413","full_name":"lygitdata/GarmentIQ","owner":"lygitdata","description":"Free \u0026 Open Source. Precise and flexible garment measurements from images - no tape measures, no delays, just fashion - forward automation.","archived":false,"fork":false,"pushed_at":"2026-04-15T00:39:43.000Z","size":1550,"stargazers_count":19,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-15T02:32:28.705Z","etag":null,"topics":["artificial-intelligence","computer-vision","fashion","garments","hrnet","measurement","segment-anything","transformers","vision-transformer"],"latest_commit_sha":null,"homepage":"https://garmentiq.ly.gd.edu.kg/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lygitdata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-10T08:13:14.000Z","updated_at":"2026-04-15T00:39:46.000Z","dependencies_parsed_at":"2025-09-03T21:32:56.841Z","dependency_job_id":null,"html_url":"https://github.com/lygitdata/GarmentIQ","commit_stats":null,"previous_names":["lygitdata/garmentiq"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/lygitdata/GarmentIQ","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lygitdata%2FGarmentIQ","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lygitdata%2FGarmentIQ/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lygitdata%2FGarmentIQ/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lygitdata%2FGarmentIQ/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lygitdata","download_url":"https://codeload.github.com/lygitdata/GarmentIQ/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lygitdata%2FGarmentIQ/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31873606,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"online","status_checked_at":"2026-04-16T02:00:06.042Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","computer-vision","fashion","garments","hrnet","measurement","segment-anything","transformers","vision-transformer"],"created_at":"2026-01-30T11:32:05.836Z","updated_at":"2026-04-16T06:00:33.849Z","avatar_url":"https://github.com/lygitdata.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GarmentIQ: Automated Garment Measurement for Fashion Retail\n\n[🌐 Official website](https://garmentiq.ly.gd.edu.kg/) | [📖 Documentation](https://garmentiq.ly.gd.edu.kg/documentation/) | [⚙️ Web pipeline](https://garmentiq.ly.gd.edu.kg/application/) | [🪄 MagicBox](https://garmentiq.ly.gd.edu.kg/documentation/magicbox/) | [📄 Paper](https://archive.gd.edu.kg/abs/20250525121523/)\n\n**Free \u0026 Open Source. Precise and flexible garment measurements from images - no tape measures, no delays, just fashion - forward automation.**\n\n\u003e 🎉 **Update (04/15/2026):** GarmentIQ now supports Segment Anything Models (SAM) for [segmentation](#segmentation), including SAM ViT base, SAM ViT large, and SAM ViT huge! Cheers! 🥂\n\n\u003cimg src=\"https://github.com/user-attachments/assets/b816c16b-bd33-4370-80b1-acc5df81cfcd\" alt=\"GarmentIQ\" width=\"600px\"/\u003e\n\n---\n\n**Content**: \n\n1. [What Are the Key Features of GarmentIQ?](#what-are-the-key-features-of-garmentiq)\n2. [Overview of GarmentIQ Python Package](#overview-of-garmentiq-python-package)\n3. [Trained Models for Classification](#trained-models-for-classification)\n4. [Quick Start](#quick-start)\n    - [Installation](#installation)\n    - [Tailor (the whole pipeline)](#tailor-the-whole-pipeline)\n    - [Classification](#classification)\n    - [Segmentation](#segmentation)\n    - [Landmark detection](#landmark-detection)\n    - [Landmark refinement and derivation](#landmark-refinement-and-derivation)\n5. [Advanced Usage](#advanced-usage)\n    - [Custom measurement instruction](#custom-measurement-instruction)\n    - [Classification model training \u0026 evaluation](#classification-model-training--evaluation)\n    - [Classification model fine-tuning](#classification-model-fine-tuning)\n6. [Issues \u0026 Feedback](#issues--feedback)\n7. [License](#license)\n8. [Acknowledgements](#acknowledgements)\n\n---\n\n## What Are the Key Features of GarmentIQ?\n\nGarmentIQ uses computer vision and models like DeiT, BiRefNet, SAM, and HRNet to classify garments, remove backgrounds, and detect key features with precision. It turns expert know-how into an intuitive measurement system - no intensive coding required. Fully modular and customizable, it adapts to your workflows while delivering fast, accurate results out of the box.\n\n| Feature | Web Demo | Video guide |\n|---------|----------|----------|\n| **Tailor (the whole pipeline)** | [Try web demo](https://garmentiq.ly.gd.edu.kg/application/) | [Watch video guide](https://garmentiq.ly.gd.edu.kg/application/guide.mp4) |\n| **Garment measurement instruction generation** | [Try web demo](https://garmentiq.ly.gd.edu.kg/application/demo/instruction-generation/) | [Watch video guide](https://garmentiq.ly.gd.edu.kg/application/demo/instruction-generation/guide.mp4) |\n| **Garment image classification** | [Try web demo](https://garmentiq.ly.gd.edu.kg/application/demo/image-classification/) | [Watch video guide](https://garmentiq.ly.gd.edu.kg/application/demo/image-classification/guide.mp4) |\n| **Garment image segmentation** | [Try web demo](https://garmentiq.ly.gd.edu.kg/application/demo/image-segmentation/) | [Watch video guide](https://garmentiq.ly.gd.edu.kg/application/demo/image-segmentation/guide.mp4) |\n| **Garment landmark detection** | [Try web demo](https://garmentiq.ly.gd.edu.kg/application/demo/landmark-detection/) | [Watch video guide](https://garmentiq.ly.gd.edu.kg/application/demo/landmark-detection/guide.mp4) |\n| **Garment landmark adjustment** | [Try web demo](https://garmentiq.ly.gd.edu.kg/application/demo/landmark-adjustment/) | [Watch video guide](https://garmentiq.ly.gd.edu.kg/application/demo/landmark-adjustment/guide.mp4) |\n\n## Overview of GarmentIQ Python Package\n\nThe `garmentiq` package provides an automated solution for garment measurement from images, utilizing computer vision techniques for classification, segmentation, and landmark extraction.\n\n- `tailor`: This module acts as the central agent for the entire pipeline, orchestrating the different stages of garment measurement from classification to landmark derivation. It integrates the functionalities of other modules to provide a smooth end-to-end process.\n\n- `classification`: This module is responsible for identifying the type of garment in an image. Its key functions include: `fine_tune_pytorch_nn`, `load_data`, `load_model`, `predict`, `test_pytorch_nn`, `train_pytorch_nn`, and `train_test_split`\n\n- `segmentation`: This module focuses on isolating garment features from the background for improved measurement accuracy. Its key functions include: `change_background_color`, `extract`, `load_model`, and `process_and_save_images`.\n\n- `landmark`: This module handles the detection, derivation, and refinement of key points on garments. Its key functions include: `derive`, `detect`, and `refine`.\n\n- Instruction Schemas: The `instruction/` folder contains 9 predefined measurement schemas in `.json` format, which are utilized by the `garment_classes.py` file `garment_classes` dictionary to define different garment types and their predefined measurement properties. Users can also define their own custom measurement instructions by creating new dictionaries formatted similarly to the existing garment classes.\n\n## Quick Start\n\nThis section provides simple examples demonstrating how to use the `garmentiq` Python API, offering users an overview of how the entire pipeline - as well as each individual step - works. For more detailed information, please refer to our [documentation](https://garmentiq.ly.gd.edu.kg/documentation/).\n\n\u003cimg src=\"https://github.com/user-attachments/assets/2de8ee34-166e-42db-8428-6e376848a9ec\" width=\"600px\" alt=\"GarmentIQ Example\"/\u003e\n\n\u003e ⚠️ Note: If you encounter errors while running the following examples in Colab, they are likely due to Python package version conflicts specific to the Colab environment. We recommend installing [MagicBox](https://garmentiq.ly.gd.edu.kg/documentation/magicbox/) on your local machine, where you can find and run these examples under `working/examples/`.\n\n### Installation\n\nPlease install from PyPI using the following command.\n\n```python\npip install garmentiq -q\n```\n\n### Tailor (the whole pipeline)\n\nThe tailor agent executes the entire pipeline in sequence: classification, segmentation (if needed), landmark detection, landmark refinement (if required), and landmark derivation (if applicable). Note that the first 3 steps can also be executed independently (the last 2 steps depend on the results returned by segmentation), without the use of the tailor agent, as described in the following subsections.\n\n[![](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/lygitdata/GarmentIQ/blob/main/test/tailor_quick_start.ipynb)\n\n```python\nimport garmentiq as giq\nfrom garmentiq.classification.model_definition import tinyViT\nfrom garmentiq.landmark.detection.model_definition import PoseHighResolutionNet\nfrom garmentiq.garment_classes import garment_classes\nfrom garmentiq.landmark.derivation.derivation_dict import derivation_dict\nfrom garmentiq.segmentation.model_definition.birefnet import BiRefNet, load_birefnet_config\nfrom garmentiq.segmentation.model_definition.sam import SamModel, load_sam_config, load_sam_processor\n\n# Download 3 test images\n# cloth_2 is short sleeve tops, cloth_3 is vest dress, cloth_4 is skirt\n!mkdir -p test_image\n!wget -q -O /content/test_image/cloth_2.jpg \\\n    https://raw.githubusercontent.com/lygitdata/GarmentIQ/refs/heads/gh-pages/asset/img/cloth_2.jpg\n!wget -q -O /content/test_image/cloth_3.jpg \\\n    https://raw.githubusercontent.com/lygitdata/GarmentIQ/refs/heads/gh-pages/asset/img/cloth_3.jpg\n!wget -q -O /content/test_image/cloth_4.jpg \\\n    https://raw.githubusercontent.com/lygitdata/GarmentIQ/refs/heads/gh-pages/asset/img/cloth_4.jpg\n\n# Download the classification model\n!mkdir -p models\n!wget -q -O /content/models/tiny_vit_inditex_finetuned.pt \\\n    https://huggingface.co/lygitdata/garmentiq/resolve/main/tiny_vit_inditex_finetuned.pt\n\n# Download the landmark detection model\n!wget -q -O /content/models/hrnet.pth \\\n    https://huggingface.co/lygitdata/garmentiq/resolve/main/hrnet.pth\n\n# Download BiRefNet model\n!mkdir -p models/birefnet\n!wget -q -O /content/models/birefnet/model.safetensors \\\n    https://huggingface.co/lygitdata/BiRefNet_garmentiq_backup/resolve/main/model.safetensors\n\n# Download SAM base model\n!mkdir -p models/sam_b\n!wget -q -O /content/models/sam_b/model.safetensors \\\n    https://huggingface.co/facebook/sam-vit-base/resolve/main/model.safetensors\n\n# Example with BiRefNet model\n# Setup the tailor agent\ntailor_biref = giq.tailor(\n    input_dir=\"/content/test_image\",\n    model_dir=\"/content/models\",\n    output_dir=\"/content/output_biref\",\n    class_dict=garment_classes,\n    do_derive=True,\n    derivation_dict=derivation_dict,\n    do_refine=True,\n    classification_model_path=\"tiny_vit_inditex_finetuned.pt\",\n    classification_model_class=tinyViT,\n    classification_model_args={\n        \"num_classes\": len(list(garment_classes.keys())),\n        \"img_size\": (120, 184),\n        \"patch_size\": 6,\n        \"resize_dim\": (120, 184),\n        \"normalize_mean\": [0.8047, 0.7808, 0.7769],\n        \"normalize_std\": [0.2957, 0.3077, 0.3081],\n    },\n    segmentation_model_path=\"birefnet/model.safetensors\",\n    segmentation_model_class=BiRefNet,\n    segmentation_model_args={\n        \"model_config\": load_birefnet_config(),\n        \"resize_dim\": (1024, 1024),\n        \"normalize_mean\": [0.485, 0.456, 0.406],\n        \"normalize_std\": [0.229, 0.224, 0.225],\n        \"background_color\": [102, 255, 102]\n    },\n    landmark_detection_model_path=\"hrnet.pth\",\n    landmark_detection_model_class=PoseHighResolutionNet(),\n    landmark_detection_model_args={\n        \"scale_std\": 200.0,\n        \"resize_dim\": [288, 384],\n        \"normalize_mean\": [0.485, 0.456, 0.406],\n        \"normalize_std\": [0.229, 0.224, 0.225],\n    },\n)\n\n# See the tailor agent's basic information\ntailor_biref.summary()\n\n# Start the measurement with refinement and derivation\nmetadata, outputs = tailor_biref.measure(save_segmentation_image=True, save_measurement_image=True)\n     \n# See the metadata\n# It makes file access much easier\nprint(metadata)\n     \n# Plot the masks\n# Go to /content/output_biref/mask_image/ to see the high resolution images\nfor image in metadata['mask_image']:\n  giq.landmark.plot(image_path=image, figsize=(3, 3))\n     \n# Plot the background modified images\n# Go to /content/output_biref/bg_modified_image to see the high resolution images\nfor image in metadata['bg_modified_image']:\n  giq.landmark.plot(image_path=image, figsize=(3, 3))\n     \n# Plot the images with desired landmarks\n# Go to /content/output_biref/measurement_image/ to see the high resolution images\nfor image in metadata['measurement_image']:\n  giq.landmark.plot(image_path=image, figsize=(3, 3))\n     \n# See the measurement results in JSON format\n# Go to /content/output_biref/measurement_json/ to see the JSON files\nimport json\n\nfor json_path in metadata['measurement_json']:\n    with open(json_path, 'r') as file:\n        data = json.load(file)\n        print(f\"{json_path}:\\n\")\n        print(json.dumps(data, indent=4, sort_keys=True))\n        print(\"\\n\\n\")\n\n# Example with SAM base model\n\n# Setup the tailor agent\ntailor_sam = giq.tailor(\n    input_dir=\"/content/test_image\",\n    model_dir=\"/content/models\",\n    output_dir=\"/content/output_sam\",\n    class_dict=garment_classes,\n    do_derive=True,\n    derivation_dict=derivation_dict,\n    do_refine=False,\n    classification_model_path=\"tiny_vit_inditex_finetuned.pt\",\n    classification_model_class=tinyViT,\n    classification_model_args={\n        \"num_classes\": len(list(garment_classes.keys())),\n        \"img_size\": (120, 184),\n        \"patch_size\": 6,\n        \"resize_dim\": (120, 184),\n        \"normalize_mean\": [0.8047, 0.7808, 0.7769],\n        \"normalize_std\": [0.2957, 0.3077, 0.3081],\n    },\n    segmentation_model_path=\"sam_b/model.safetensors\",\n    segmentation_model_class=SamModel,\n    segmentation_model_args={\n        \"model_config\": {\"config\": load_sam_config(\"sam-vit-b\")},\n        \"processor\": load_sam_processor(\"sam-vit-b\", use_fast=False),\n        \"input_points\": [[[1000, 900]]],\n        \"background_color\": [102, 255, 102]\n    },\n    landmark_detection_model_path=\"hrnet.pth\",\n    landmark_detection_model_class=PoseHighResolutionNet(),\n    landmark_detection_model_args={\n        \"scale_std\": 200.0,\n        \"resize_dim\": [288, 384],\n        \"normalize_mean\": [0.485, 0.456, 0.406],\n        \"normalize_std\": [0.229, 0.224, 0.225],\n    },\n)\n\n# See the tailor agent's basic information\ntailor_sam.summary()\n     \n# Start the measurement with refinement and derivation\nmetadata, outputs = tailor_sam.measure(save_segmentation_image=True, save_measurement_image=True)\n     \n# See the metadata\n# It makes file access much easier\nprint(metadata)\n     \n# Plot the masks\n# Go to /content/output_sam/mask_image/ to see the high resolution images\nfor image in metadata['mask_image']:\n  giq.landmark.plot(image_path=image, figsize=(3, 3))\n\n# Plot the background modified images\n# Go to /content/output_sam/bg_modified_image to see the high resolution images\nfor image in metadata['bg_modified_image']:\n  giq.landmark.plot(image_path=image, figsize=(3, 3))   \n\n# Plot the images with desired landmarks\n# Go to /content/output_sam/measurement_image/ to see the high resolution images\nfor image in metadata['measurement_image']:\n  giq.landmark.plot(image_path=image, figsize=(3, 3))\n     \n# See the measurement results in JSON format\n# Go to /content/output_sam/measurement_json/ to see the JSON files\nimport json\n\nfor json_path in metadata['measurement_json']:\n    with open(json_path, 'r') as file:\n        data = json.load(file)\n        print(f\"{json_path}:\\n\")\n        print(json.dumps(data, indent=4, sort_keys=True))\n        print(\"\\n\\n\")\n```\n\n### Classification\n\n[![](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/lygitdata/GarmentIQ/blob/main/test/classification_quick_start.ipynb)\n\n```python\nimport garmentiq as giq\nfrom garmentiq.classification.model_definition import tinyViT\nfrom garmentiq.classification.utils import CachedDataset\n\n# Download test data and a pretrained model\n!mkdir -p models\n\n!curl -L -o /content/garmentiq-classification-set-nordstrom-and-myntra.zip \\\n  https://www.kaggle.com/api/v1/datasets/download/lygitdata/garmentiq-classification-set-nordstrom-and-myntra\n\n!wget -q -O /content/models/tiny_vit_inditex_finetuned.pt \\\n    https://huggingface.co/lygitdata/garmentiq/resolve/main/tiny_vit_inditex_finetuned.pt\n\n# Prepare test data\nDATA = giq.classification.train_test_split(\n    output_dir=\"data\",\n    metadata_csv=\"metadata.csv\",\n    label_column=\"garment\",\n    train_zip_dir=\"garmentiq-classification-set-nordstrom-and-myntra.zip\",\n    test_size=0.15,\n    verbose=True\n)\n\ntest_images, test_labels, _ = giq.classification.load_data(\n    df=DATA[\"test_metadata\"],\n    img_dir=DATA[\"test_images\"],\n    label_column=\"garment\",\n    resize_dim=(120, 184),\n    normalize_mean=[0.8047, 0.7808, 0.7769],\n    normalize_std=[0.2957, 0.3077, 0.3081]\n)\n\n# Load the pretrained model\nclassifier = giq.classification.load_model(\n    model_path=\"/content/models/tiny_vit_inditex_finetuned.pt\",\n    model_class=tinyViT,\n    model_args={\"num_classes\": 9, \"img_size\": (120, 184), \"patch_size\": 6}\n)\n\n# Fit the model on the whole test data\ngiq.classification.test_pytorch_nn(\n    model_path=\"/content/models/tiny_vit_inditex_finetuned.pt\",\n    model_class=tinyViT,\n    model_args={\"num_classes\": 9, \"img_size\": (120, 184), \"patch_size\": 6},\n    dataset_class=CachedDataset,\n    dataset_args={\n        \"raw_labels\": DATA[\"test_metadata\"][\"garment\"],\n        \"cached_images\": test_images,\n        \"cached_labels\": test_labels,\n    },\n    param={\"batch_size\": 64},\n)\n\n# Fit the model on a single image\nimg_to_test = DATA['test_metadata']['filename'][88]\n\npred_label, pred_prob = giq.classification.predict(\n    model=classifier,\n    image_path=f\"data/test/images/{img_to_test}\",\n    classes=DATA['test_metadata']['garment'].unique().tolist(),\n    resize_dim=(120, 184),\n    normalize_mean=[0.8047, 0.7808, 0.7769],\n    normalize_std=[0.2957, 0.3077, 0.3081]\n)\n\nprint(\n    \"True label: \", img_to_test,\n    \"\\nPredicted label: \", pred_label,\n    \"\\nPredicted Probabilities: \", pred_prob\n)\n```\n\n### Segmentation\n\n[![](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/lygitdata/GarmentIQ/blob/main/test/segmentation_quick_start.ipynb)\n\n```python\nimport garmentiq as giq\nfrom garmentiq.segmentation.model_definition.birefnet import BiRefNet, load_birefnet_config\nfrom garmentiq.segmentation.model_definition.sam import SamModel, load_sam_config, load_sam_processor\n     \n# Download a test image\n!mkdir -p test_image\n!wget -q -O /content/test_image/cloth_1.jpg \\\n    https://raw.githubusercontent.com/lygitdata/GarmentIQ/refs/heads/gh-pages/asset/img/cloth_1.jpg\n\n# Download BiRefNet model\n!mkdir -p /content/models/birefnet\n\n!wget -q -O /content/models/birefnet/model.safetensors \\\n    https://huggingface.co/lygitdata/BiRefNet_garmentiq_backup/resolve/main/model.safetensors\n\n# Download SAM base model\n!mkdir -p /content/models/sam_b\n\n!wget -q -O /content/models/sam_b/model.safetensors \\\n    https://huggingface.co/facebook/sam-vit-base/resolve/main/model.safetensors\n     \n#Example with BiRefNet model\n# Load the BiRefNet model\nbirefnet = giq.segmentation.load_model(\n    model_class=BiRefNet,\n    model_path=\"/content/models/birefnet/model.safetensors\",\n    model_args=load_birefnet_config()\n)\n\n# Extract the mask\noriginal_img_biref, mask_biref = giq.segmentation.extract(\n    model=birefnet,\n    image_path='/content/test_image/cloth_1.jpg',\n    # BiRefNet specific kwargs:\n    resize_dim=(1024, 1024),\n    normalize_mean=[0.485, 0.456, 0.406],\n    normalize_std=[0.229, 0.224, 0.225]\n)\n\n# Change background color\nbg_modified_img_biref = giq.segmentation.change_background_color(\n    image_np=original_img_biref,\n    mask_np=mask_biref,\n    background_color=[102, 255, 102]\n)\n\n# Plot the original image, mask, and background modified image\ngiq.segmentation.plot(image_np=original_img_biref, figsize=(3, 3))\ngiq.segmentation.plot(image_np=mask_biref, figsize=(3, 3))\ngiq.segmentation.plot(image_np=bg_modified_img_biref, figsize=(3, 3))\n     \n# Example with SAM Base model\n# Load the BiRefNet model\nsam = giq.segmentation.load_model(\n    model_class=SamModel,\n    model_path=\"/content/models/sam_b/model.safetensors\",\n    model_args={\"config\": load_sam_config(\"sam-vit-b\")}\n)\n\n# Extract the mask\noriginal_img_sam, mask_sam = giq.segmentation.extract(\n    model=sam,\n    image_path='/content/test_image/cloth_1.jpg',\n    processor=load_sam_processor(\"sam-vit-b\"),\n    input_points=[[[512, 512]]]\n)\n\n# Change background color\nbg_modified_img_sam = giq.segmentation.change_background_color(\n    image_np=original_img_sam,\n    mask_np=mask_sam,\n    background_color=[102, 255, 102]\n)\n\n# Plot the original image, mask, and background modified image\ngiq.segmentation.plot(image_np=original_img_sam, figsize=(3, 3))\ngiq.segmentation.plot(image_np=mask_sam, figsize=(3, 3))\ngiq.segmentation.plot(image_np=bg_modified_img_sam, figsize=(3, 3))\n```\n\n### Landmark detection\n\n[![](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/lygitdata/GarmentIQ/blob/main/test/landmark_detection_quick_start.ipynb)\n\n```python\nimport garmentiq as giq\nfrom garmentiq.landmark.detection.model_definition import PoseHighResolutionNet\nfrom garmentiq.garment_classes import garment_classes\n\n# Download a vest dress image and a pretrained model\n!mkdir -p test_image\n!wget -q -O /content/test_image/cloth_3.jpg \\\n    https://raw.githubusercontent.com/lygitdata/GarmentIQ/refs/heads/gh-pages/asset/img/cloth_3.jpg\n\n!mkdir -p models\n!wget -q -O /content/models/hrnet.pth \\\n    https://huggingface.co/lygitdata/garmentiq/resolve/main/hrnet.pth\n\n# Plot the image\ngiq.landmark.plot(image_path=\"/content/test_image/cloth_3.jpg\", figsize=(3, 3))\n\n# Load the pretrained model from Hugging Face\nHRNet = giq.landmark.detection.load_model(\n    model_path=\"/content/models/hrnet.pth\",\n    model_class=PoseHighResolutionNet()\n)\n\n# Detect predefined landmarks\ncoords, maxvals, detection_dict = giq.landmark.detect(\n    class_name=\"vest dress\",\n    class_dict=garment_classes,\n    image_path=\"/content/test_image/cloth_3.jpg\",\n    model=HRNet,\n    scale_std=200.0,\n    resize_dim=[288, 384],\n    normalize_mean=[0.485, 0.456, 0.406],\n    normalize_std=[0.229, 0.224, 0.225]\n)\n\n# Plot the detected coordinates\ngiq.landmark.plot(image_path=\"/content/test_image/cloth_3.jpg\", coordinate=coords, figsize=(3, 3), color=\"green\")\n```\n\n### Landmark refinement and derivation\n\nNote that segmentation mask is erquired for landmark refinement and derivation and they are also based on the landmark detection results. As a result, before refining and deriving lanrmarks, we first need to segment the image and detect predefined landmarks.\n\n[![](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/lygitdata/GarmentIQ/blob/main/test/landmark_refinement_and_derivation_quick_start.ipynb)\n\n```python\nimport garmentiq as giq\nfrom garmentiq.landmark.detection.model_definition import PoseHighResolutionNet\nfrom garmentiq.garment_classes import garment_classes\nfrom garmentiq.segmentation.model_definition.birefnet import BiRefNet, load_birefnet_config\n     \n# Download a vest dress image\n!mkdir -p test_image\n!wget -q -O /content/test_image/cloth_3.jpg \\\n    https://raw.githubusercontent.com/lygitdata/GarmentIQ/refs/heads/gh-pages/asset/img/cloth_3.jpg\n\n# Download HRNet model\n!mkdir -p models\n!wget -q -O /content/models/hrnet.pth \\\n    https://huggingface.co/lygitdata/garmentiq/resolve/main/hrnet.pth\n\n# Download BiRefNet model\n!mkdir -p /content/models/birefnet\n!wget -q -O /content/models/birefnet/model.safetensors \\\n    https://huggingface.co/lygitdata/BiRefNet_garmentiq_backup/resolve/main/model.safetensors\n     \n# Plot the image\ngiq.landmark.plot(image_path=\"/content/test_image/cloth_3.jpg\", figsize=(3, 3))\n     \n# Load the pretrained model from Hugging Face\nHRNet = giq.landmark.detection.load_model(\n    model_path=\"/content/models/hrnet.pth\",\n    model_class=PoseHighResolutionNet()\n)\n\n# Detect predefined landmarks\ncoords, maxvals, detection_dict = giq.landmark.detect(\n    class_name=\"vest dress\",\n    class_dict=garment_classes,\n    image_path=\"/content/test_image/cloth_3.jpg\",\n    model=HRNet,\n    scale_std=200.0,\n    resize_dim=[288, 384],\n    normalize_mean=[0.485, 0.456, 0.406],\n    normalize_std=[0.229, 0.224, 0.225]\n)\n\n# Plot the detected coordinates\ngiq.landmark.plot(image_path=\"/content/test_image/cloth_3.jpg\", coordinate=coords, figsize=(3, 3), color=\"green\")\n     \n# Segmentation mask is required for refinement and derivation\n# So we need to do segmentation first\n# Load the BiRefNet model\nbirefnet = giq.segmentation.load_model(\n    model_class=BiRefNet,\n    model_path=\"/content/models/birefnet/model.safetensors\",\n    model_args=load_birefnet_config()\n)\n\n# Extract the mask\noriginal_img, mask = giq.segmentation.extract(\n    model=birefnet,\n    image_path='/content/test_image/cloth_3.jpg',\n    # BiRefNet specific kwargs:\n    resize_dim=(1024, 1024),\n    normalize_mean=[0.485, 0.456, 0.406],\n    normalize_std=[0.229, 0.224, 0.225]\n)\n     \n# Refine the landmarks\nrefined_coords, refined_detection_dict = giq.landmark.refine(\n    class_name=\"vest dress\",\n    detection_np=coords,\n    detection_conf=maxvals,\n    detection_dict=detection_dict,\n    mask=mask,\n    window_size=5,\n    ksize=(11, 11),\n    sigmaX=0.0\n)\n\n# Print the original coordinates and the refined coordinates\nprint(\"Original coordinates:\\n\", coords)\nprint(\"Refined coordinates:\\n\", refined_coords)\n     \n# Derive custom landmarks\nderived_coords, derived_detection_dict = giq.landmark.derive(\n    class_name=\"vest dress\",\n    detection_dict=refined_detection_dict,\n    derivation_dict=giq.landmark.derivation_dict.derivation_dict,\n    landmark_coords=refined_coords,\n    np_mask=mask\n)\n     \nimport numpy as np\n# Plot the derived point\ngiq.landmark.plot(\n    image_path=\"/content/test_image/cloth_3.jpg\",\n    coordinate=np.concatenate((refined_coords, np.array([[derived_coords['20']]])), axis=1),\n    figsize=(3, 3),\n    color=\"green\"\n)\n```\n\n## Advanced Usage\n\n\u003e ⚠️ Note: If you encounter errors while running the following examples in Colab, they are likely due to Python package version conflicts specific to the Colab environment. We recommend installing [MagicBox](https://garmentiq.ly.gd.edu.kg/documentation/magicbox/) on your local machine, where you can find and run these examples under `working/examples/`.\n\n### Custom measurement instruction\n\n[![](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/lygitdata/GarmentIQ/blob/main/test/custom_measurement_instruction_advanced_usage.ipynb)\n\n```python\nimport json\nimport copy\n     \n\n# See our predefined garments and measurement instructions\n#\n# - `num_predefeined_points` and `index_range` are determined by training data -\n# DeepFashion2, change them if it is indeed necessary.\n#\n# - `instruction` is the path to a .json file, GarmentIQ has predefined\n# instructions.\n#\n# Generate or see predefined instructions at:\n# https://garmentiq.ly.gd.edu.kg/application/demo/instruction-generation/\nfrom garmentiq.garment_classes import garment_classes\nprint(json.dumps(garment_classes, indent=4))\n     \n\n# Let us change the measurement instruction of skirt\n# See the predefined instruction\n# There are `waist`, `full length`, and `hips` as measurements in GarmentIQ's\n# default measurement instruction of a skirt. What if we only want `waist` and\n# `hips`? Simply create one! Recommend to use GarmentIQ instruction generation\n# tool to generate the instruciton:\n# https://garmentiq.ly.gd.edu.kg/application/demo/instruction-generation/\nwith open(garment_classes['skirt']['instruction'], 'r') as file:\n    data = json.load(file)\nprint(json.dumps(data, indent=4))\n     \n\n# Let us create a simple instruction in python here and convert it to json\nskirt_new = {\n    \"skirt\": {\n        \"landmarks\": {\n            \"1\": {\n                \"predefined\": True,\n                \"description\": \"waist_left\",\n                \"x\": 60,\n                \"y\": 40\n            },\n            \"3\": {\n                \"predefined\": True,\n                \"description\": \"waist_right\",\n                \"x\": 140,\n                \"y\": 40\n            },\n            \"4\": {\n                \"predefined\": True,\n                \"description\": \"side_seam_left\",\n                \"x\": 50,\n                \"y\": 80\n            },\n            \"8\": {\n                \"predefined\": True,\n                \"description\": \"side_seam_right\",\n                \"x\": 150,\n                \"y\": 80\n            }\n        },\n        \"measurements\": {\n            \"waist\": {\n                \"landmarks\": {\n                    \"start\": \"1\",\n                    \"end\": \"3\"\n                },\n                \"description\": \"/\"\n            },\n            \"hips\": {\n                \"landmarks\": {\n                    \"start\": \"4\",\n                    \"end\": \"8\"\n                },\n                \"description\": \"/\"\n            }\n        }\n    }\n}\n\n# Save it to a JSON file with indentation\nwith open('skirt_new.json', 'w') as file:\n    json.dump(skirt_new, file, indent=4)\n     \n\n# Create a new garment class metadata dictionary\nnew_garment_classes = copy.deepcopy(garment_classes)\nnew_garment_classes['skirt']['instruction'] = 'skirt_new.json'\nprint(new_garment_classes['skirt'])\n     \n\n# Okay now we have the new instruction, let us try the detection model to see\n# the difference\n# Import necessary modules\nimport garmentiq as giq\nfrom garmentiq.landmark.detection.model_definition import PoseHighResolutionNet\n\n# Download a skirt image and a pretrained model\n!mkdir -p test_image\n!wget -q -O /content/test_image/cloth_4.jpg \\\n    https://raw.githubusercontent.com/lygitdata/GarmentIQ/refs/heads/gh-pages/asset/img/cloth_4.jpg\n\n!mkdir -p models\n!wget -q -O /content/models/hrnet.pth \\\n    https://huggingface.co/lygitdata/garmentiq/resolve/main/hrnet.pth\n     \n\n# Plot the image\ngiq.landmark.plot(image_path=\"/content/test_image/cloth_4.jpg\", figsize=(3, 3))\n     \n\n# Load the pretrained model from Hugging Face\nHRNet = giq.landmark.detection.load_model(\n    model_path=\"/content/models/hrnet.pth\",\n    model_class=PoseHighResolutionNet()\n)\n     \n\n# Detect landmarks (DEFAULT instruction)\n_, _, detection_dict = giq.landmark.detect(\n    class_name=\"skirt\",\n    class_dict=garment_classes,\n    image_path=\"/content/test_image/cloth_4.jpg\",\n    model=HRNet,\n    scale_std=200.0,\n    resize_dim=[288, 384],\n    normalize_mean=[0.485, 0.456, 0.406],\n    normalize_std=[0.229, 0.224, 0.225]\n)\n\n# Clean the detection dictionary\n# See that we have all the three measurements\ndetection_dict_cleaned = giq.utils.clean_detection_dict(\n    class_name='skirt',\n    image_name='cloth_4.jpg',\n    detection_dict=detection_dict\n)\ndetection_dict_cleaned\n     \n\n# Detect landmarks (NEW instruction)\n# Note that we use `class_dict=new_garment_classes` here\n_, _, detection_dict_new = giq.landmark.detect(\n    class_name=\"skirt\",\n    class_dict=new_garment_classes,\n    image_path=\"/content/test_image/cloth_4.jpg\",\n    model=HRNet,\n    scale_std=200.0,\n    resize_dim=[288, 384],\n    normalize_mean=[0.485, 0.456, 0.406],\n    normalize_std=[0.229, 0.224, 0.225]\n)\n\n# Clean the detection dictionary\n# See that we only have two measurements we want\ndetection_dict_new_cleaned = giq.utils.clean_detection_dict(\n    class_name='skirt',\n    image_name='cloth_4.jpg',\n    detection_dict=detection_dict_new\n)\ndetection_dict_new_cleaned\n```\n\n### Classification model training \u0026 evaluation\n\n[![](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/lygitdata/GarmentIQ/blob/main/test/classification_model_training_evaluation_advanced_usage.ipynb)\n\n```python\nimport garmentiq as giq\nfrom garmentiq.classification.model_definition import CNN3\nfrom garmentiq.classification.utils import CachedDataset\nimport torch.optim as optim\nimport torch.nn as nn\n     \n\n# Download training data\n# To train a model using GarmentIQ framework, your data must be in a zip file\n# and the zip file should have the same structure as our data. See the link:\n# https://www.kaggle.com/datasets/lygitdata/garmentiq-classification-set-nordstrom-and-myntra\n!curl -L -o garmentiq-classification-set-nordstrom-and-myntra.zip \\\n  https://www.kaggle.com/api/v1/datasets/download/lygitdata/garmentiq-classification-set-nordstrom-and-myntra\n     \n\n# Split the data into training set and testing set\ndata = giq.classification.train_test_split(\n    output_dir=\"data\",\n    train_zip_dir=\"garmentiq-classification-set-nordstrom-and-myntra.zip\",\n    metadata_csv=\"metadata.csv\",\n    label_column=\"garment\",\n    test_size=0.15,\n    verbose=True\n)\n     \n\n# Load the training set into memory for faster I/O during training\ntrain_images, train_labels, _ = giq.classification.load_data(\n    df=data[\"train_metadata\"],\n    img_dir=data[\"train_images\"],\n    label_column=\"garment\",\n    resize_dim=(60, 92),\n    normalize_mean=[0.8047, 0.7808, 0.7769],\n    normalize_std=[0.2957, 0.3077, 0.3081]\n)\n     \n\n# Train with GarmentIQ predefined model - CNN3\n# Note that we use `model_class=CNN3` here\n# For demonstration purpose, we only use 2 folds and 5 epochs\n# Models are saved at the folder `cnn3_models`\n# It automatically selects the model with the lowest cross entropy\n# as the best model\ngiq.classification.train_pytorch_nn(\n    model_class=CNN3,\n    model_args={\"num_classes\": 9},\n    dataset_class=CachedDataset,\n    dataset_args={\n        \"metadata_df\": data[\"train_metadata\"],\n        \"raw_labels\": data[\"train_metadata\"][\"garment\"],\n        \"cached_images\": train_images,\n        \"cached_labels\": train_labels,\n    },\n    param={\n        \"optimizer_class\": optim.AdamW,\n        \"optimizer_args\": {\"lr\": 0.001, \"weight_decay\": 1e-4},\n        \"n_fold\": 2,\n        \"n_epoch\": 5,\n        \"patience\": 2,\n        \"batch_size\": 256,\n        \"model_save_dir\": \"cnn3_models\",\n        \"best_model_name\": \"best_cnn3_model.pt\",\n    },\n)\n     \n\n# Train with a user-defined model\nclass UserDefinedCNN(nn.Module):\n    def __init__(self, num_classes):\n        super(UserDefinedCNN, self).__init__()\n        self.features = nn.Sequential(\n            nn.Conv2d(3, 32, kernel_size=3, padding=1),\n            nn.BatchNorm2d(32),\n            nn.ReLU(inplace=True),\n            nn.MaxPool2d(2, 2),\n            nn.Dropout(0.2),\n            nn.Conv2d(32, 64, kernel_size=3, padding=1),\n            nn.BatchNorm2d(64),\n            nn.ReLU(inplace=True),\n            nn.MaxPool2d(2, 2),\n            nn.Dropout(0.25),\n            nn.AdaptiveAvgPool2d((4, 4)),\n        )\n        self.classifier = nn.Sequential(\n            nn.Linear(64 * 4 * 4, 128),\n            nn.ReLU(inplace=True),\n            nn.Dropout(0.3),\n            nn.Linear(128, num_classes),\n        )\n    def forward(self, x):\n        x = self.features(x)\n        x = x.view(x.size(0), -1)\n        x = self.classifier(x)\n        return x\n\n# For demonstration purpose, we only use 2 folds and 5 epochs\n# Models are saved at the folder `cnn1_models`\n# It automatically selects the model with the lowest cross entropy\n# as the best model\ngiq.classification.train_pytorch_nn(\n    model_class=UserDefinedCNN,\n    model_args={\"num_classes\": 9},\n    dataset_class=CachedDataset,\n    dataset_args={\n        \"metadata_df\": data[\"train_metadata\"],\n        \"raw_labels\": data[\"train_metadata\"][\"garment\"],\n        \"cached_images\": train_images,\n        \"cached_labels\": train_labels,\n    },\n    param={\n        \"optimizer_class\": optim.AdamW,\n        \"optimizer_args\": {\"lr\": 0.001, \"weight_decay\": 1e-4},\n        \"n_fold\": 2,\n        \"n_epoch\": 5,\n        \"patience\": 2,\n        \"batch_size\": 256,\n        \"model_save_dir\": \"userdefined_cnn_models\",\n        \"best_model_name\": \"best_userdefined_cnn_model.pt\",\n    },\n)\n     \n\n# Load the testing set for model evaluation\ntest_images, test_labels, _ = giq.classification.load_data(\n    df=data[\"test_metadata\"],\n    img_dir=data[\"test_images\"],\n    label_column=\"garment\",\n    resize_dim=(60, 92),\n    normalize_mean=[0.8047, 0.7808, 0.7769],\n    normalize_std=[0.2957, 0.3077, 0.3081]\n)\n     \n\n# Evaluate CNN3 model on the testing set\ngiq.classification.test_pytorch_nn(\n    model_path=\"cnn3_models/best_cnn3_model.pt\",\n    model_class=CNN3,\n    model_args={\"num_classes\": 9},\n    dataset_class=CachedDataset,\n    dataset_args={\n        \"raw_labels\": data[\"test_metadata\"][\"garment\"],\n        \"cached_images\": test_images,\n        \"cached_labels\": test_labels,\n    },\n    param={\"batch_size\": 64},\n)\n     \n\n# Evaluate user-defined model on the testing set\n# We can see that the CNN3 model performs better on the test set\n# than this user-defined CNN model\ngiq.classification.test_pytorch_nn(\n    model_path=\"userdefined_cnn_models/best_userdefined_cnn_model.pt\",\n    model_class=UserDefinedCNN,\n    model_args={\"num_classes\": 9},\n    dataset_class=CachedDataset,\n    dataset_args={\n        \"raw_labels\": data[\"test_metadata\"][\"garment\"],\n        \"cached_images\": test_images,\n        \"cached_labels\": test_labels,\n    },\n    param={\"batch_size\": 64},\n)\n```\n\n### Classification model fine-tuning\n\n[![](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/lygitdata/GarmentIQ/blob/main/test/classification_model_fine_tuning_advanced_usage.ipynb)\n\n```python\nimport garmentiq as giq\nfrom garmentiq.classification.model_definition import tinyViT\nfrom garmentiq.classification.utils import CachedDataset\nimport torch.optim as optim\n     \n\n# Download fine-tuning data\n# To train a model using GarmentIQ framework, your data must be in a zip file\n# and the zip file should have the same structure as our data. See the link:\n# https://www.kaggle.com/datasets/lygitdata/zara-clothes-image-data\n!curl -L -o /content/zara-clothes-image-data.zip\\\n  https://www.kaggle.com/api/v1/datasets/download/lygitdata/zara-clothes-image-data\n\n# Download the base model - tinyViT - to be finetuned\n!mkdir -p models\n!wget -q -O /content/models/tiny_vit.pt \\\n    https://huggingface.co/lygitdata/garmentiq/resolve/main/tiny_vit.pt\n     \n\n# Prepare the data for fine-tuning\n# As our data size is small, we make the testing set to be 0%\n# You can see from the test set summary that the size is 0\ndata = giq.classification.train_test_split(\n    output_dir=\"data\",\n    train_zip_dir=\"zara-clothes-image-data.zip\",\n    metadata_csv=\"metadata.csv\",\n    label_column=\"garment\",\n    test_size=0,\n    verbose=True\n)\n     \n\n# Load the training set into memory for faster I/O during training\ntrain_images, train_labels, _ = giq.classification.load_data(\n    df=data[\"train_metadata\"],\n    img_dir=data[\"train_images\"],\n    label_column=\"garment\",\n    resize_dim=(120, 184),\n    normalize_mean=[0.8047, 0.7808, 0.7769],\n    normalize_std=[0.2957, 0.3077, 0.3081]\n)\n     \n\n# Fine-tune the pretrained tinyViT model\n# For demonstration purpose, we only use 5 folds and 5 epochs\n# Models are saved at the folder `finetuned_models`\n# It automatically selects the model with the lowest cross entropy\n# as the best model\ngiq.classification.fine_tune_pytorch_nn(\n    model_class=tinyViT,\n    model_args={\"num_classes\": 9, \"img_size\": (120, 184), \"patch_size\": 6},\n    dataset_class=CachedDataset,\n    dataset_args={\n        \"metadata_df\": data[\"train_metadata\"],\n        \"raw_labels\": data[\"train_metadata\"][\"garment\"],\n        \"cached_images\": train_images,\n        \"cached_labels\": train_labels,\n    },\n    param={\n        \"pretrained_path\": \"/content/models/tiny_vit.pt\",\n        \"freeze_layers\": True,\n        \"unfreeze_patterns\": [\"classifier\", \"fc\"],\n        \"optimizer_class\": optim.AdamW,\n        \"optimizer_args\": {\"lr\": 0.00002, \"weight_decay\": 1e-4},\n        \"n_fold\": 5,\n        \"n_epoch\": 5,\n        \"patience\": 2,\n        \"batch_size\": 128,\n        \"model_save_dir\": \"finetuned_models\",\n        \"best_model_name\": \"best_finetuned.pt\"\n    },\n)\n     \n\n# See the performance of the finetuned model on the fine-tuning dataset\ngiq.classification.test_pytorch_nn(\n    model_path=\"/content/finetuned_models/best_finetuned.pt\",\n    model_class=tinyViT,\n    model_args={\"num_classes\": 9, \"img_size\": (120, 184), \"patch_size\": 6},\n    dataset_class=CachedDataset,\n    dataset_args={\n        \"raw_labels\": data[\"train_metadata\"][\"garment\"],\n        \"cached_images\": train_images,\n        \"cached_labels\": train_labels,\n    },\n    param={\"batch_size\": 64},\n)\n```\n\n## Trained Models for Classification\n\nWe release the following models trained as part of this project. Models having `_inditex_finetuned` in their names means that they were finetuned on a small set of garment data from Inditex - Zara.\n\n| Model | Test Accuracy | Test F1 Score | Fine-tune Accuracy | Fine-tune F1 Score | Link |\n|---------|----------|----------|----------|----------|----------|\n| `cnn_3.pt` | 0.9458 | 0.9459 | / | / | [See the model](https://huggingface.co/lygitdata/garmentiq/blob/main/cnn_3.pt) |\n| `cnn_4.pt` | 0.9533 | 0.9533 | / | / | [See the model](https://huggingface.co/lygitdata/garmentiq/blob/main/cnn_4.pt) |\n| `tiny_vit.pt` | 0.9576 | 0.9576 | / | / | [See the model](https://huggingface.co/lygitdata/garmentiq/blob/main/tiny_vit.pt) |\n| `cnn_3_inditex_finetuned.pt` | 0.9074 | 0.9068 | 0.9197 | 0.9216 | [See the model](https://huggingface.co/lygitdata/garmentiq/blob/main/cnn_3_inditex_finetuned.pt) |\n| `cnn_4_inditex_finetuned.pt` | 0.9132 | 0.9137 | 0.9592 | 0.9585 | [See the model](https://huggingface.co/lygitdata/garmentiq/blob/main/cnn_4_inditex_finetuned.pt) |\n| `tiny_vit_inditex_finetuned.pt` | 0.9484 | 0.9483 | 0.9916 | 0.9917 | [See the model](https://huggingface.co/lygitdata/garmentiq/blob/main/tiny_vit_inditex_finetuned.pt) |\n\n## Issues \u0026 Feedback\n\nFound a bug or have a feature request? Please open an issue on our [GitHub Issues page](https://github.com/lygitdata/GarmentIQ/issues).\n\n## License\n\nGarmentIQ's Python API code is licensed under the MIT License.\n\n## Acknowledgements\n\nWe sincerely thank Adrian Gonzalez-Sieira and Laura Rodriguez-Barreiro from INDITEX for their invaluable suggestions and continuous support throughout this research. We are also grateful to everyone at ETH Zurich and the ETH AI Center for their coordination and collaborative efforts.\n\nWe gratefully acknowledge the use and adaptation of the following open-source resources:\n\n- https://github.com/facebookresearch/deit\n- https://github.com/ZhengPeng7/BiRefNet\n- https://github.com/facebookresearch/segment-anything\n- https://github.com/svip-lab/HRNet-for-Fashion-Landmark-Estimation.PyTorch\n- https://github.com/switchablenorms/DeepFashion2\n- https://www.kaggle.com/datasets/paramaggarwal/fashion-product-images-dataset\n- https://www.kaggle.com/datasets/lygitdata/garmentiq-classification-set-nordstrom-and-myntra\n- https://www.kaggle.com/datasets/lygitdata/zara-clothes-image-data\n- All Python packages listed in `requirements.txt`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flygitdata%2Fgarmentiq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flygitdata%2Fgarmentiq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flygitdata%2Fgarmentiq/lists"}