Welcome to the code repository for WallMaria, an ACG image search engine designed specifically for anime, manga, and game enthusiasts! This search engine provides an efficient and intuitive way to help users find ACG-related images on the internet.
- Text Search: Search for images using keywords, phrases, or descriptions.
- Image Feature Search: Upload an image and find similar pictures based on visual content.
- Image Text Joint Search: Upload an image and use keywords, phrases, or descriptions to find images related to the image.
By following these simple steps, you can quickly start and run the project locally.
git clone https://github.com/ALiersEL/WallMaria.git
To save time, we have deployed a backend server for you to use. You can skip the backend setup and go directly to the frontend setup. However, if you want to run the backend locally, please follow the steps below.
- Python 3.10 or higher
- MongoDB
- Redis
- Milvus
- Navigate to the backend directory within the WallMaria project
cd WallMaria/wallmaria-backend
- Install the required packages
pip install -r requirements.txt
Create a config.json
file in the wallmaria-backend
directory.
Ensure your services are configured according to the config.json file. An example configuration is shown below:
{
"mongo": {
"url": "mongodb://root:<your_password>@<your_host>:27017/",
"database": "wallmaria"
},
"milvus": {
"host": "<your_host>",
"port": "19530",
"user": "root",
"password": "<your_password>"
},
"redis": {
"host": "<your_host>",
"port": "6379",
"password": "<your_password>"
},
"clip": {
"path": "checkpoints/<your_checkpoint>.pth"
}
}
Please replace <your_password>, <your_host>, and <your_checkpoint> with your actual password, host address, and checkpoint name.
- Start the backend server
uvicorn main:app --port 8000 --reload
- Visit
http://localhost:8000
in your browser to open the web interface
- Node.js 14 or higher
- npm (comes with Node.js) or Yarn
- Navigate to the frontend directory within the WallMaria project
cd WallMaria/wallmaria-frontend
- Install the dependencies
or if you are using Yarn
npm install
yarn install
The frontend application is pre-configured to connect with a deployed backend server. The default backend URL is already set in the .env
file located in the wallmaria-frontend
directory.
Default .env
configuration:
VITE_APP_BACKEND_URL=http://wallrose.huox3.cn:7000
If you wish to use your own backend server or if you have a different URL for the backend, you can update the VITE_APP_BACKEND_URL
environment variable in the .env
file accordingly.
To connect to a custom backend server, modify the .env
file with your backend server's URL:
Example for custom backend URL:
VITE_APP_BACKEND_URL=http://localhost:8000
After updating the .env
file, restart the frontend server to apply the changes.
-
Serve the application with hot reload at localhost
npm run dev
or if you are using Yarn
yarn dev
-
Open
http://localhost:5173
in your web browser to view and interact with the frontend.(You can change the port in thevite.config.ts
file.)
To build the frontend for production, use the build script. This will create a dist
folder with all the files optimized for deployment.
npm run build
or if you are using Yarn
yarn build
After building, you can deploy the dist
folder to any static file server or frontend hosting service.
For planned features and known issues, see the open issues.
The contributions of the open-source community make it an excellent place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License. For more information, please see the LICENSE
file.