$ show CaraJ7/MMSearch
MMSearch is a framework for evaluating large multimodal models (LMMs) as multi-modal search engines. It provides a pipeline (MMSearch-Engine) that enables any LMM to perform multimodal search by generating queries, retrieving web content, reranking results, and summarizing answers. The repository includes evaluation scripts for four tasks (end2end, requery, rerank, summarization) and a demo for running the engine on custom queries. The system relies on external dependencies like DuckDuckGo search, Playwright for web scraping, and Hugging Face datasets. The architecture is modular with separate components for model loading, prompt templating, web retrieval, content processing, and scoring.
The LLM identified 2 files worth highlighting for reuse:
Provides advanced image processing functions for preprocessing web screenshots. Includes adaptive pixel slimming (gradient-based blank area removal), splitting long screenshots into fixed-height chunks, and cropping image search results to remove irrelevant sections using Sobel and Hough transforms. Self-contained and reusable in any project processing document images or screenshots.
Offers a lightweight, reusable solution for extracting main content from HTML web pages. Uses BeautifulSoup to remove boilerplate (scripts, styles, navigation) and extract text from main content areas. Includes a clean_text function for whitespace normalization. Self-contained and directly integrable into any web scraping or data extraction pipeline.