Welcome to the Server Side README for the Shop Sense Client-Server System! In this document, we'll provide an overview of the server-side application, its functionality, and how to set it up.
Before you begin, ensure you have met the following requirements:
- Python: Make sure you have Python installed. You can download it from python.org.
-
Clone the Repository:
- Clone the Shop Sense Server Side repository to your local machine.
git clone https://github.com/YourUsername/shop-sense-server.git
-
Navigate to the Project Directory:
- Change your current directory to the project folder.
cd shop-sense-server -
Create a Virtual Environment (optional but recommended):
- Create a virtual environment to isolate project dependencies.
python -m venv venv
-
Activate the Virtual Environment (Linux/macOS):
source venv/bin/activateOn Windows:
venv\Scripts\activate
-
Install Dependencies:
- Install the required Python dependencies.
pip install -r requirements.txt
-
Install FFmpeg:
-
To work with video processing, you'll need FFmpeg. Here's how to install it:
-
On macOS, you can use Homebrew:
brew install ffmpeg
-
On Windows, you can follow the instructions on the FFmpeg website to download and install it.
-
After installation, add the path to the FFmpeg executable in the lib.py file. You can do this by adding the following lines to your Python code before importing moviepy:
import os os.environ["IMAGEIO_FFMPEG_EXE"] = "/path/to/ffmpeg"
-
-
-
Start the Server:
- Start the Python server application.
python api.py
The server should now be running and listening for incoming requests.
-
Go to the client side to start the client app: SHOP-SENSE-WEB
-
Object Tracking Configuration:
- The server includes an object tracking module that can be configured based on your needs. You can modify the following settings in the object tracking file:
duration = 1 # Time in seconds skip_detect = 5 # Do object detection every n frames (to not skip any frame, set skip_detect = 1) desired_interval = 2 # Take every n frames (to not skip any frame, set desired_interval = 1)
- Adjust the values of
duration,skip_detect, anddesired_intervalaccording to your specific requirements. These settings control the behavior of the object tracking process.
-
Sort Configuration:
- The server includes a tracking model - SORT that can be configured based on your needs. You can modify the following settings in the object tracking file:
max_age = 2 min_hits = 3 iou_threshold = 0.3