# CarDetection **Repository Path**: evianchu/car-detection ## Basic Information - **Project Name**: CarDetection - **Description**: An open-source project focused on car detection, providing robust tools and algorithms for identifying vehicles in images and videos, suitable for traffic monitoring and autonomous driving systems. - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-11-25 - **Last Updated**: 2025-11-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Model Training and Evaluation for Car Detection ## 1. Environment Setup ``` shell mamba create -n CarDetection mamba activate CarDetection pip install -r requirements.txt ``` ## 2. Data Preparation ### 2.1 Prepare BIT-Vehicle Dataset - Download the BIT-Vehicle dataset from the [site](https://pan.baidu.com/s/1KbmQ3B7uK29d8O4Z5Cxxwg). - Extract the dataset to the `./data/bit vehicle/dataset` directory. - Extract the annotations to the `./data/bit vehicle/annotations` directory. - Ensure the directory structure is as follows: ./data/bit vehicle/ ├── dataset/ │ ├── vehicle_0000001.jpg │ ├── vehicle_0000002.jpg │ └── ... └── annotations/ ├── vehicle_0000001.xml ├── vehicle_0000002.xml └── ... ### 2.2 Dataset Splitting ``` shell python3 prepare_data.py --data_dir "./data/bit vehicle" --output_dir "./dataset_split" ``` ## 3. Training ``` shell python3 model_train.py ``` ## 4. Evaluation # View in time real-time training metrics ``` bash uvicorn realtime_api:app --host 0.0.0.0 --port 8000 ``` Then open `viewer.html` in your web browser by http://127.0.0.1:8000/viewer.html ### 4.1 Model Evaluation ``` shell python3 model_evaluate.py --model_path "./final_model.pth" ``` ## 5. Serve ``` shell python3 -m uvicorn webView.model_serving:app --host 0.0.0.0 --port 8001 --reload ``` Then open `http://127.0.0.1:8001` in your web browser to access the model serving interface.