{"id":51221041,"url":"https://github.com/huggon1/multimodal-tagging-system","last_synced_at":"2026-06-28T07:03:29.279Z","repository":{"id":344488550,"uuid":"1181691584","full_name":"huggon1/multimodal-tagging-system","owner":"huggon1","description":"A public-safe multimodal tagging system combining OCR, captioning, and retrieval.","archived":false,"fork":false,"pushed_at":"2026-03-14T14:00:41.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-15T09:13:25.704Z","etag":null,"topics":["fastapi","gradio","information-retrieval","multimodal","ocr"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/huggon1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2026-03-14T13:49:54.000Z","updated_at":"2026-03-14T14:01:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/huggon1/multimodal-tagging-system","commit_stats":null,"previous_names":["huggon1/multimodal-tagging-system"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/huggon1/multimodal-tagging-system","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huggon1%2Fmultimodal-tagging-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huggon1%2Fmultimodal-tagging-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huggon1%2Fmultimodal-tagging-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huggon1%2Fmultimodal-tagging-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huggon1","download_url":"https://codeload.github.com/huggon1/multimodal-tagging-system/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huggon1%2Fmultimodal-tagging-system/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34880191,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"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":["fastapi","gradio","information-retrieval","multimodal","ocr"],"created_at":"2026-06-28T07:03:28.592Z","updated_at":"2026-06-28T07:03:29.264Z","avatar_url":"https://github.com/huggon1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# multimodal-tagging-system\n\nA cleaned-up public version of a graduation-project codebase for multimodal tag generation.\n\n## Highlights\n\n- Combines OCR, captioning, and embedding recall in one tagging flow\n- Preserves a compact research-style implementation with a runnable demo UI\n- Uses environment-based configuration instead of local hardcoded paths\n- Ships with a reduced sample tag set suitable for public release\n\n## What It Does\n\nGiven a post title, post content, and one or more images, the system combines:\n\n- OCR over the images\n- image captioning\n- embedding-based tag recall\n\nto produce a shortlist of recommended tags.\n\n## Repository Layout\n\n```text\nmultimodal-tagging-system/\n  app/\n    config.py\n    ocr_service.py\n    prompt_templates.py\n    schemas.py\n    tag_service.py\n  ui/\n    gradio_app.py\n  training/\n    train_triplet_embedding.py\n  data/\n    tags_new.txt\n  assets/\n    template.html\n```\n\n## Requirements\n\nInstall the base dependencies with:\n\n```bash\npip install -r requirements.txt\n```\n\nThe runtime still expects local caption and embedding model weights, which are intentionally not committed.\n\n## Public Cleanup\n\nThis repository intentionally excludes:\n\n- local model weights\n- private database settings\n- generated HTML reports\n- local experiment caches\n- old prototype folders\n- the original full tag vocabulary; `data/tags_new.txt` now contains a compact sample tag set for demo use\n\n## Services\n\n### OCR service\n\n```bash\nuvicorn app.ocr_service:app --host 0.0.0.0 --port 8001\n```\n\n### Tag service\n\nBefore starting, point the environment variables to your local caption and embedding models if needed:\n\n```bash\nset MMTAG_CAPTION_MODEL_PATH=E:\\\\path\\\\to\\\\caption-model\nset MMTAG_EMBED_MODEL_PATH=E:\\\\path\\\\to\\\\embedding-model\nset MMTAG_DEVICE=cuda\n```\n\nThen run:\n\n```bash\nuvicorn app.tag_service:app --host 0.0.0.0 --port 8002\n```\n\n### Demo UI\n\n```bash\npython ui/gradio_app.py\n```\n\nThe Gradio demo expects the OCR and tag services to already be running, so start those two service processes first.\n\n## Training\n\n`training/train_triplet_embedding.py` preserves the original triplet-loss tuning script for the embedding model. It expects a local `output.json` training file and local base model weights.\n\nExample:\n\n```bash\npython training/train_triplet_embedding.py ^\n  --data training\\output.json ^\n  --base-model E:\\path\\to\\embedding-model\n```\n\n## Notes\n\n- The code is preserved as a compact research-style implementation rather than a production package.\n- Some original Chinese prompt text had encoding noise in the source folders, so this public version uses cleaned prompt templates for readability.\n- The Gradio demo calls the OCR and tag services over HTTP, so start those services first.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuggon1%2Fmultimodal-tagging-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuggon1%2Fmultimodal-tagging-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuggon1%2Fmultimodal-tagging-system/lists"}