The LifeXplore Backend System is a modular project designed to process and evaluate queries using a WebSocket-based Python application (lscqueryserver)
and several submodules. Use the official LifeXplore frontend application or develop your own.
For more details, refer to the paper. Below is an overview of the system and its components.
The lscqueryserver (app folder) is the core Python application that processes queries and returns results. It uses WebSocket communication and integrates with the following submodules. Read more
-
clip- Handles CLIP (Contrastive Language–Image Pretraining) queries for natural language processing.
- Supports FAISS indices for efficient similarity search. Read more
-
mongo- Provides a Docker container and helper scripts for managing the MongoDB database.
- Includes functionality for importing database backups. Read more
-
solr- Includes a Docker Compose file to set up a SOLR instance for searching descriptions.
- Optional: Use the SOLR Docker Compose script to initialize and configure a SOLR instance. Read more
-
images_server- Provides a Docker Compose file to set up an NGINX instance for hosting images. Read more
-
analysis_server- A standalone server that communicates with the
lscqueryserverto add new images. - Features:
- Upload server.
- File watcher for uploads.
- Customizable analysis framework with support for additional processing pipelines. Read more
- A standalone server that communicates with the
-
evaluation- A framework for creating evaluation projects.
- Communicates directly with the
lscqueryserverto perform evaluations based on aconfig.yamlfile. - Automates testing of various models (e.g., OpenCLIP), query structures, and filters. Read more
-
helpers- Provides utility scripts for tasks such as managing SOLR or database dumps. Read more
-
shared- Contains shared code used across multiple modules.
- Includes CLIP logic and FAISS index storage for the
clipserver. Read more
- Install Docker.
- Install Python.
-
CLIP Server
- Configure and start the CLIP server with a Python environment.
- Optionally, use an existing FAISS index. Read more
-
MongoDB
- Configure and start the MongoDB instance using Docker Compose.
- Import a database backup if available. Read more
-
Image Server
- Configure and start the image server using Docker Compose. Read more
-
LSC Query Server
- Configure and start the
lscqueryserverusing Docker Compose. Read more
- Configure and start the
-
SOLR
- Set up and start a SOLR instance using Docker Compose.
- Import a backup if needed. Read more
-
Analysis Server
- Configure and start the
analysis_serverto add new content or extend existing pipelines. Read more
- Configure and start the
Each module includes a dedicated README file with detailed instructions for configuration and usage. Refer to these files for module-specific setup and advanced configurations.
This modular design allows for flexibility in deployment and customization, making it easy to extend or adapt the system to specific requirements.
This documentation provides an overview of the LifeXplore Backend System and its components. For detailed instructions and setup information, refer to the individual README files included in each module.
The new format for FAISS indices was designed to save storage space and optimize loading times. Instead of a single CSV file, the new format uses a folder containing two files:
-
index.faiss- Stores the FAISS index in binary format.
- This format is more efficient in terms of storage and loading performance.
-
index.labels- Contains the labels as strings.
- This file allows easy mapping of labels to the stored features.
-
Old Format:
- A single CSV file storing both labels and feature sets in ASCII format.
- This format was storage-intensive and resulted in longer loading times.
-
New Format:
- A folder containing the above-mentioned files (
index.faissandindex.labels). - Reduces storage requirements and improves performance.
- A folder containing the above-mentioned files (
To convert old CSV-format index files to the new FAISS format, use the script helpers/migration/csv_index_to_faiss.py.
- Copy the
.env.examplefile to thehelpers/migrationfolder. - Run the setup script and activate the virtual environment:
./setup.sh source .venv/bin/activate - Execute the migration script:
python helpers/migration/csv_index_to_faiss.py <csv_filename> -f <foldername>
<csv_filename>: Path to the CSV file containing the old index data.<foldername>: (Optional) Folder name to save the new files. Defaults to the CSV filename with a.faissextension.
After running the script, a folder containing the index.faiss and index.labels files will be created.
For more details on using and configuring the FAISS index, refer to the README files in the respective modules.