Alternative LLM Predictor Implementation
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
]
|
||||
},
|
||||
"Model": {
|
||||
"description": "A 3D model file.",
|
||||
"description": "A set that contains models, can include PBR textureset",
|
||||
"color": "#FFA500",
|
||||
"examples": [
|
||||
"Chair.fbx",
|
||||
@@ -17,11 +17,12 @@
|
||||
]
|
||||
},
|
||||
"Decal": {
|
||||
"description": "A texture designed to be projected onto surfaces.",
|
||||
"description": "A alphamasked textureset",
|
||||
"color": "#90EE90",
|
||||
"examples": [
|
||||
"Graffiti01",
|
||||
"LeakStain03"
|
||||
"LeakStain03",
|
||||
"DecalMancover"
|
||||
]
|
||||
},
|
||||
"Atlas": {
|
||||
@@ -33,11 +34,14 @@
|
||||
]
|
||||
},
|
||||
"UtilityMap": {
|
||||
"description": "A map used for specific technical purposes (e.g., flow map).",
|
||||
"description": "A useful image-asset consisting of only a single texture. Therefor each Utilitymap can only contain a single item.",
|
||||
"color": "#D3D3D3",
|
||||
"examples": [
|
||||
"FlowMap",
|
||||
"CurvatureMap"
|
||||
"CurvatureMap",
|
||||
"imperfection",
|
||||
"smudges",
|
||||
"scratches"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -47,7 +51,9 @@
|
||||
"color": "#3d3021",
|
||||
"examples": [
|
||||
"_col.",
|
||||
"_basecolor."
|
||||
"_basecolor.",
|
||||
"albedo",
|
||||
"diffuse"
|
||||
],
|
||||
"standard_type": "COL",
|
||||
"bit_depth_rule": "force_8bit"
|
||||
@@ -77,7 +83,8 @@
|
||||
"color": "#3d1f11",
|
||||
"examples": [
|
||||
"_rough.",
|
||||
"_rgh."
|
||||
"_rgh.",
|
||||
"_gloss"
|
||||
],
|
||||
"standard_type": "ROUGH",
|
||||
"bit_depth_rule": "force_8bit"
|
||||
@@ -156,7 +163,12 @@
|
||||
"color": "#3d3a24",
|
||||
"examples": [
|
||||
"_imp.",
|
||||
"_imperfection."
|
||||
"_imperfection.",
|
||||
"splatter",
|
||||
"scratches",
|
||||
"smudges",
|
||||
"hairs",
|
||||
"fingerprints"
|
||||
],
|
||||
"standard_type": "IMPERFECTION",
|
||||
"bit_depth_rule": "force_8bit"
|
||||
@@ -172,11 +184,16 @@
|
||||
"bit_depth_rule": ""
|
||||
},
|
||||
"EXTRA": {
|
||||
"description": "Non-standard/Unclassified File",
|
||||
"description": "asset previews or metadata",
|
||||
"color": "#2f363d",
|
||||
"examples": [
|
||||
".txt",
|
||||
".zip"
|
||||
".zip",
|
||||
"preview.",
|
||||
"_flat.",
|
||||
"_sphere.",
|
||||
"_Cube.",
|
||||
"thumb"
|
||||
],
|
||||
"standard_type": "",
|
||||
"bit_depth_rule": ""
|
||||
@@ -247,4 +264,63 @@
|
||||
"CALCULATE_STATS_RESOLUTION": "1K",
|
||||
"DEFAULT_ASSET_CATEGORY": "Surface",
|
||||
"TEMP_DIR_PREFIX": "_PROCESS_ASSET_"
|
||||
,
|
||||
"llm_predictor_examples": [
|
||||
{
|
||||
"input": "MessyTextures/Concrete_Damage_Set/concrete_col.png\nMessyTextures/Concrete_Damage_Set/concrete_N.png\nMessyTextures/Concrete_Damage_Set/concrete_rough.jpg\nMessyTextures/Concrete_Damage_Set/height_map_concrete.tif\nMessyTextures/Concrete_Damage_Set/Thumbs.db\nMessyTextures/Fabric_Pattern/pattern_01_diffuse.tga\nMessyTextures/Fabric_Pattern/pattern_01_ao.png\nMessyTextures/Fabric_Pattern/pattern_01_normal.png\nMessyTextures/Fabric_Pattern/notes.txt\nMessyTextures/Fabric_Pattern/variant_blue_diffuse.tga",
|
||||
"output": {
|
||||
"predicted_assets": [
|
||||
{
|
||||
"suggested_asset_name": "Concrete_Damage_Set",
|
||||
"predicted_asset_type": "Surface",
|
||||
"files": [
|
||||
{"file_path": "MessyTextures/Concrete_Damage_Set/concrete_col.png", "predicted_file_type": "MAP_COL"},
|
||||
{"file_path": "MessyTextures/Concrete_Damage_Set/concrete_N.png", "predicted_file_type": "MAP_NRM"},
|
||||
{"file_path": "MessyTextures/Concrete_Damage_Set/concrete_rough.jpg", "predicted_file_type": "MAP_ROUGH"},
|
||||
{"file_path": "MessyTextures/Concrete_Damage_Set/height_map_concrete.tif", "predicted_file_type": "MAP_DISP"},
|
||||
{"file_path": "MessyTextures/Concrete_Damage_Set/Thumbs.db", "predicted_file_type": "FILE_IGNORE"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"suggested_asset_name": "Fabric_Pattern_01",
|
||||
"predicted_asset_type": "Surface",
|
||||
"files": [
|
||||
{"file_path": "MessyTextures/Fabric_Pattern/pattern_01_diffuse.tga", "predicted_file_type": "MAP_COL"},
|
||||
{"file_path": "MessyTextures/Fabric_Pattern/pattern_01_ao.png", "predicted_file_type": "MAP_AO"},
|
||||
{"file_path": "MessyTextures/Fabric_Pattern/pattern_01_normal.png", "predicted_file_type": "MAP_NRM"},
|
||||
{"file_path": "MessyTextures/Fabric_Pattern/variant_blue_diffuse.tga", "predicted_file_type": "MAP_COL"},
|
||||
{"file_path": "MessyTextures/Fabric_Pattern/variant_blue_flat.tga", "predicted_file_type": "EXTRA"},
|
||||
{"file_path": "MessyTextures/Fabric_Pattern/notes.txt", "predicted_file_type": "EXTRA"}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"input": "SciFi_Drone/Drone_Model.fbx\nSciFi_Drone/Textures/Drone_BaseColor.png\nSciFi_Drone/Textures/Drone_Metallic.png\nSciFi_Drone/Textures/Drone_Roughness.png\nSciFi_Drone/Textures/Drone_Normal.png\nSciFi_Drone/Textures/Drone_Emissive.jpg\nSciFi_Drone/ReferenceImages/concept.jpg",
|
||||
"output": {
|
||||
"predicted_assets": [
|
||||
{
|
||||
"suggested_asset_name": "SciFi_Drone",
|
||||
"predicted_asset_type": "Model",
|
||||
"files": [
|
||||
{"file_path": "SciFi_Drone/Drone_Model.fbx", "predicted_file_type": "MODEL"},
|
||||
{"file_path": "SciFi_Drone/Textures/Drone_BaseColor.png", "predicted_file_type": "MAP_COL"},
|
||||
{"file_path": "SciFi_Drone/Textures/Drone_Metallic.png", "predicted_file_type": "MAP_METAL"},
|
||||
{"file_path": "SciFi_Drone/Textures/Drone_Roughness.png", "predicted_file_type": "MAP_ROUGH"},
|
||||
{"file_path": "SciFi_Drone/Textures/Drone_Normal.png", "predicted_file_type": "MAP_NRM"},
|
||||
{"file_path": "SciFi_Drone/Textures/Drone_Emissive.jpg", "predicted_file_type": "EXTRA"},
|
||||
{"file_path": "SciFi_Drone/ReferenceImages/concept.jpg", "predicted_file_type": "EXTRA"}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"llm_endpoint_url": "http://100.65.14.122:1234/v1/chat/completions",
|
||||
"llm_api_key": "",
|
||||
"llm_model_name": "local-model",
|
||||
"llm_temperature": 0.5,
|
||||
"llm_request_timeout": 120,
|
||||
"llm_predictor_prompt": "You are an expert asset classification system. Your task is to analyze a list of file paths from a directory, identify a pattern and then group them into logical assets, assigning an asset type and file type to each file.\\n\\n**Definitions:**\\n\\n* **Asset Types:** These define the overall category of an asset. Use one of the following keys for `predicted_asset_type`:\\n ```json\\n {ASSET_TYPE_DEFINITIONS}\\n ```\\n\\n* **File Types:** These define the specific purpose of each file. Use one of the following keys for `predicted_file_type`:\\n ```json\\n {FILE_TYPE_DEFINITIONS}\\n ```\\n\\n**Task:**\\n\\nGiven the following file list:\\n\\n```text\\n{FILE_LIST}\\n```\\n\\nAnalyze the file paths and names. Group the files into logical assets. For each asset, determine the most appropriate `predicted_asset_type` from the definitions above. For each file within an asset, determine the most appropriate `predicted_file_type` from the definitions above. Files that should be ignored (like Thumbs.db) should use the `FILE_IGNORE` type. Files that don't fit a standard map type but belong to the asset should use `EXTRA`.\\n\\n**Output Format:**\\n\\nYour response MUST be ONLY a single, perfectly valid JSON object adhering strictly to the structure below. Do NOT include any text before or after the JSON object. Ensure all strings are correctly quoted and escaped, and there are no trailing commas.\\n\\nCRITICAL: Ensure the output is strictly valid JSON parsable by standard libraries. This means NO comments (like // or /* */), NO trailing commas, and correct quoting/escaping of all strings.\\n\\n```json\\n{\\n \"predicted_assets\": [\\n {\\n \"suggested_asset_name\": \"string\", // Your best guess for a concise asset name based on file paths/names\\n \"predicted_asset_type\": \"string\", // Key from Asset Types definitions\\n \"files\": [\\n {\\n \"file_path\": \"string\", // Exact relative path from the input list\\n \"predicted_file_type\": \"string\" // Key from File Types definitions\\n },\\n // ... more files\\n ]\\n },\\n // ... more assets\\n ]\\n}\\n```\\n\\n**Examples:**\\n\\nHere are examples of input file lists and the desired JSON output:\\n\\n```json\\n[\\n {EXAMPLE_INPUT_OUTPUT_PAIRS}\\n]\\n```\\n\\nNow, process the provided file list and generate the JSON output."
|
||||
}
|
||||
Reference in New Issue
Block a user