garmentiq.garment_classes

 1import pkg_resources
 2import os
 3
 4package_name = __name__.split(".")[0]
 5garment_classes = {
 6    "long sleeve dress": {
 7        "num_predefined_points": 37,
 8        "index_range": (219, 256),
 9        "instruction": pkg_resources.resource_filename(package_name, "instruction/long sleeve dress.json")
10    }, 
11    "long sleeve top": {
12        "num_predefined_points": 33,
13        "index_range": (25, 58),
14        "instruction": pkg_resources.resource_filename(package_name, "instruction/long sleeve top.json")
15    }, 
16    "short sleeve dress": {
17        "num_predefined_points": 29,
18        "index_range": (190, 219),
19        "instruction": pkg_resources.resource_filename(package_name, "instruction/short sleeve dress.json")
20    }, 
21    "short sleeve top": {
22        "num_predefined_points": 25,
23        "index_range": (0, 25),
24        "instruction": pkg_resources.resource_filename(package_name, "instruction/short sleeve top.json")
25    }, 
26    "shorts": {
27        "num_predefined_points": 10,
28        "index_range": (158, 168),
29        "instruction": pkg_resources.resource_filename(package_name, "instruction/shorts.json")
30    }, 
31    "skirt": {
32        "num_predefined_points": 8,
33        "index_range": (182, 190),
34        "instruction": pkg_resources.resource_filename(package_name, "instruction/skirt.json")
35    }, 
36    "trousers": {
37        "num_predefined_points": 14,
38        "index_range": (168, 182),
39        "instruction": pkg_resources.resource_filename(package_name, "instruction/trousers.json")
40    }, 
41    "vest": {
42        "num_predefined_points": 15,
43        "index_range": (128, 143),
44        "instruction": pkg_resources.resource_filename(package_name, "instruction/vest.json")
45    }, 
46    "vest dress": {
47        "num_predefined_points": 19,
48        "index_range": (256, 275),
49        "instruction": pkg_resources.resource_filename(package_name, "instruction/vest dress.json")
50    }
51}
52"""dict: A comprehensive dictionary defining various garment classes and their properties for GarmentIQ.
53
54Each key in this dictionary represents a specific garment type (e.g., "long sleeve dress").
55The value associated with each garment type is a dictionary containing:
56    - "num_predefined_points" (int): The total number of predefined (detected)
57      keypoints for this garment class.
58    - "index_range" (tuple): A tuple (start_index, end_index) specifying the
59      slice of the model's output that corresponds to the predefined keypoints
60      for this garment. These indices are 0-based and exclusive of the end_index.
61    - "instruction" (str): The file path to a JSON schema that details the
62      specific landmarks (predefined and derivable) and measurements for this
63      garment type. These paths are resolved using `pkg_resources.resource_filename`
64      to ensure they are correctly located within the installed package.
65
66This dictionary serves as a central registry for the GarmentIQ system to
67understand and process different types of clothing.
68"""
package_name = 'garmentiq'
garment_classes = {'long sleeve dress': {'num_predefined_points': 37, 'index_range': (219, 256), 'instruction': '/content/GarmentIQ/src/garmentiq/instruction/long sleeve dress.json'}, 'long sleeve top': {'num_predefined_points': 33, 'index_range': (25, 58), 'instruction': '/content/GarmentIQ/src/garmentiq/instruction/long sleeve top.json'}, 'short sleeve dress': {'num_predefined_points': 29, 'index_range': (190, 219), 'instruction': '/content/GarmentIQ/src/garmentiq/instruction/short sleeve dress.json'}, 'short sleeve top': {'num_predefined_points': 25, 'index_range': (0, 25), 'instruction': '/content/GarmentIQ/src/garmentiq/instruction/short sleeve top.json'}, 'shorts': {'num_predefined_points': 10, 'index_range': (158, 168), 'instruction': '/content/GarmentIQ/src/garmentiq/instruction/shorts.json'}, 'skirt': {'num_predefined_points': 8, 'index_range': (182, 190), 'instruction': '/content/GarmentIQ/src/garmentiq/instruction/skirt.json'}, 'trousers': {'num_predefined_points': 14, 'index_range': (168, 182), 'instruction': '/content/GarmentIQ/src/garmentiq/instruction/trousers.json'}, 'vest': {'num_predefined_points': 15, 'index_range': (128, 143), 'instruction': '/content/GarmentIQ/src/garmentiq/instruction/vest.json'}, 'vest dress': {'num_predefined_points': 19, 'index_range': (256, 275), 'instruction': '/content/GarmentIQ/src/garmentiq/instruction/vest dress.json'}}

dict: A comprehensive dictionary defining various garment classes and their properties for GarmentIQ.

Each key in this dictionary represents a specific garment type (e.g., "long sleeve dress").

The value associated with each garment type is a dictionary containing:
  • "num_predefined_points" (int): The total number of predefined (detected) keypoints for this garment class.
  • "index_range" (tuple): A tuple (start_index, end_index) specifying the slice of the model's output that corresponds to the predefined keypoints for this garment. These indices are 0-based and exclusive of the end_index.
  • "instruction" (str): The file path to a JSON schema that details the specific landmarks (predefined and derivable) and measurements for this garment type. These paths are resolved using pkg_resources.resource_filename to ensure they are correctly located within the installed package.

This dictionary serves as a central registry for the GarmentIQ system to understand and process different types of clothing.