Spaces:
Sleeping
Sleeping
| """ | |
| Advanced Logo Recognition Model Configuration | |
| This module provides different model options for logo recognition | |
| """ | |
| MODELS = { | |
| "mobile_net": { | |
| "name": "google/mobilenet_v2_1.0_224", | |
| "processor": "google/mobilenet_v2_1.0_224", | |
| "description": "Fast, lightweight model - Best for CPU", | |
| "input_size": 224 | |
| }, | |
| "vit_base": { | |
| "name": "google/vit-base-patch16-224", | |
| "processor": "google/vit-base-patch16-224", | |
| "description": "Vision Transformer - Better accuracy", | |
| "input_size": 224 | |
| }, | |
| "resnet": { | |
| "name": "microsoft/resnet-50", | |
| "processor": "microsoft/resnet-50", | |
| "description": "ResNet-50 - Good balance of speed/accuracy", | |
| "input_size": 224 | |
| }, | |
| "dino": { | |
| "name": "facebook/dino-vits16", | |
| "processor": "facebook/dino-vits16", | |
| "description": "DINO ViT - Excellent for visual understanding", | |
| "input_size": 224 | |
| } | |
| } | |
| # Default model | |
| DEFAULT_MODEL = "mobile_net" | |
| # Model-specific configurations | |
| MODEL_CONFIG = { | |
| "google/mobilenet_v2_1.0_224": { | |
| "max_image_size": 2048, | |
| "batch_size": 8 | |
| }, | |
| "google/vit-base-patch16-224": { | |
| "max_image_size": 2048, | |
| "batch_size": 4 | |
| } | |
| } | |