[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-ahmetozlu--vehicle_counting_tensorflow":3,"tool-ahmetozlu--vehicle_counting_tensorflow":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",140436,2,"2026-04-05T23:32:43",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":79,"owner_location":80,"owner_email":81,"owner_twitter":79,"owner_website":82,"owner_url":83,"languages":84,"stars":93,"forks":94,"last_commit_at":95,"license":96,"difficulty_score":10,"env_os":97,"env_gpu":98,"env_ram":99,"env_deps":100,"category_tags":107,"github_topics":108,"view_count":10,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":128,"updated_at":129,"faqs":130,"releases":161},555,"ahmetozlu\u002Fvehicle_counting_tensorflow","vehicle_counting_tensorflow",":oncoming_automobile: \"MORE THAN VEHICLE COUNTING!\" This project provides prediction for speed, color and size of the vehicles with TensorFlow Object Counting API.","vehicle_counting_tensorflow 是一款基于 TensorFlow 的开源项目，专注于视频流中的车辆检测、跟踪与计数。它不仅统计车辆数量，还能深入分析每辆车的详细信息，涵盖车型分类（如汽车、卡车）、颜色、行驶方向、速度及尺寸预估。\n\n这一开源方案解决了传统交通监控中数据采集维度单一的问题，将简单的计数升级为多维度的交通流量分析。它非常适合计算机视觉开发者、算法研究人员以及希望构建智能交通系统的技术人员参考和使用。\n\n其技术亮点在于融合了 TensorFlow 目标检测 API 与 OpenCV 图像处理能力。通过特定算法，它能实时计算车速并识别颜色，最终生成包含完整测量数据的 CSV 文件，同时自动保存检测到的车辆截图。尽管目前仍在持续优化中，但它提供了清晰的架构示例，是探索物体计数与交通分析的优秀入门资源。","# VEHICLE DETECTION, TRACKING AND COUNTING\nThis sample project focuses on \"Vechicle Detection, Tracking and Counting\" using [**TensorFlow Object Counting API**](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Ftensorflow_object_counting_api). ***Please contact if you need professional vehicle detection & tracking & counting project with the super high accuracy!***\n\n---\n\n***The [TensorFlow Object Counting API](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Ftensorflow_object_counting_api) is used as a base for object counting on this project, more info can be found on this [repo](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Ftensorflow_object_counting_api).***\n\n---\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fahmetozlu_vehicle_counting_tensorflow_readme_5c435cb570e7.gif\">\n\u003C\u002Fp>\n\n---\n\n***The developing is on progress! This sample project will be updated soon, the more talented traffic analyzer app will be available in this repo!***\n\n---\n\n## General Capabilities of This Sample Project\n\nThis sample project has more than just counting vehicles, here are the additional capabilities of it:\n\n- Detection and classification of the vehicles (car, truck, bicycle, motorcycle, bus)\n- Recognition of approximate vehicle color\n- Detection of vehicle direction of travel\n- Prediction the speed of the vehicle\n- Prediction of approximate vehicle size\n- **The images of detected vehicles are cropped from video frame and they are saved as new images under \"[detected_vehicles](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Ftree\u002Fmaster\u002Fdetected_vehicles)\" folder path**\n- **The program gives a .csv file as an output ([traffic_measurement.csv](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Fblob\u002Fmaster\u002Ftraffic_measurement.csv)) which includes \"Vehicle Type\u002FSize\", \" Vehicle Color\", \" Vehicle Movement Direction\", \" Vehicle Speed (km\u002Fh)\" rows, after the end of the process for the source video file.**\n\nToDos:\n\n- More powerful detection models will be shared.\n- Sample codes will be developed to process different types of input videos (for different types of road traffics such as two way lane road).\n- Code cleanup will be performed.\n- UI will be developed. \n\nThe input video can be accessible by this [link](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Fblob\u002Fmaster\u002Finput_video.mp4).\n\n## Theory\n\n### System Architecture\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fahmetozlu_vehicle_counting_tensorflow_readme_724f9cb928f8.png\">\n\u003C\u002Fp>\n\n- Vehicle detection and classification have been developed using TensorFlow Object Detection API, [see](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Fblob\u002Fmaster\u002Fvehicle_detection_main.py) for more info.\n- Vehicle speed prediction has been developed using OpenCV via image pixel manipulation and calculation, [see](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Ftree\u002Fmaster\u002Futils\u002Fspeed_and_direction_prediction_module) for more info.\n- Vehicle color prediction has been developed using OpenCV via K-Nearest Neighbors Machine Learning Classification Algorithm is Trained Color Histogram Features, [see](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Ftree\u002Fmaster\u002Futils\u002Fcolor_recognition_module) for more info.\n\n[TensorFlow™](https:\u002F\u002Fwww.tensorflow.org\u002F) is an open source software library for numerical computation using data flow graphs. Nodes in the graph represent mathematical operations, while the graph edges represent the multidimensional data arrays (tensors) communicated between them.\n\n[OpenCV (Open Source Computer Vision Library)](https:\u002F\u002Fopencv.org\u002Fabout.html) is an open source computer vision and machine learning software library. OpenCV was built to provide a common infrastructure for computer vision applications and to accelerate the use of machine perception in the commercial products.\n\n### Tracker\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fahmetozlu_vehicle_counting_tensorflow_readme_3c81d7ea3ad9.png\" | width=700>\n\u003C\u002Fp>\n\nSource video is read frame by frame with OpenCV. Each frames is processed by [\"SSD with Mobilenet\" model](http:\u002F\u002Fdownload.tensorflow.org\u002Fmodels\u002Fobject_detection\u002Fssd_mobilenet_v1_coco_2017_11_17) is developed on TensorFlow. This is a loop that continue working till reaching end of the video. The main pipeline of the tracker is given at the above Figure.\n\n### Model\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fahmetozlu_vehicle_counting_tensorflow_readme_516818984034.png\">\n\u003C\u002Fp>\n\nBy default I use an [\"SSD with Mobilenet\" model](http:\u002F\u002Fdownload.tensorflow.org\u002Fmodels\u002Fobject_detection\u002Fssd_mobilenet_v1_coco_2017_11_17) in this project. You can find more information about SSD in [here](https:\u002F\u002Ftowardsdatascience.com\u002Funderstanding-ssd-multibox-real-time-object-detection-in-deep-learning-495ef744fab). See the [detection model zoo](https:\u002F\u002Fgithub.com\u002Ftensorflow\u002Fmodels\u002Fblob\u002Fmaster\u002Fresearch\u002Fobject_detection\u002Fg3doc\u002Fdetection_model_zoo.md) for a list of other models that can be run out-of-the-box with varying speeds and accuracies.\n\n*The minimum vehicle detection threshold can be set [in this line](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Ftensorflow_object_counting_api\u002Fblob\u002Fmaster\u002Futils\u002Fvisualization_utils.py#L443) in terms of percentage. The default minimum vehicle detecion threshold is 0.5!*\n\n## Project Demo\n\nDemo video of the project is available on [My YouTube Channel](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=PrqnhHf6fhM).\n\n## Installation\n\n**Docker setup with Nvidia GPU:** Run the demo in the GPU without installing anything, just nvidia-docker. The command to set up this docker:\n\n    docker-compose up\n    \nAlternative for nvidia-docker, you can follow the installation steps are given below!\n\n**1.) Python and pip**\n\nPython is automatically installed on Ubuntu. Take a moment to confirm (by issuing a python -V command) that one of the following Python versions is already installed on your system:\n\n- Python 3.3+\n\nThe pip or pip3 package manager is usually installed on Ubuntu. Take a moment to confirm (by issuing a *pip -V* or *pip3 -V* command) that pip or pip3 is installed. We strongly recommend version 8.1 or higher of pip or pip3. If Version 8.1 or later is not installed, issue the following command, which will either install or upgrade to the latest pip version:\n\n    $ sudo apt-get install python3-pip python3-dev # for Python 3.n\n    \n**2.) OpenCV**\n\nSee required commands to install OpenCV on Ubuntu in [here](https:\u002F\u002Fgist.github.com\u002Fdynamicguy\u002F3d1fce8dae65e765f7c4).\n\n**3.) TensorFlow**\n\nInstall TensorFlow by invoking one of the following commands:\n\n    $ pip3 install tensorflow     # Python 3.n; CPU support (no GPU support)\n    $ pip3 install tensorflow-gpu # Python 3.n; GPU support\n\nCurrent program is compatible with TensorFlow 1.5.0 version. Please uncomment these lines to run the program with TensorFlow 2.x: [#1](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Fblob\u002Fmaster\u002Futils\u002Flabel_map_util.py#L117), [#2](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Fblob\u002Fmaster\u002Fvehicle_detection_main.py#L77), [#3](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Fblob\u002Fmaster\u002Fvehicle_detection_main.py#L77), [#4](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Fblob\u002Fmaster\u002Fvehicle_detection_main.py#L78).\n\n**4.) TensorFlow Object Detection API**\n\nSee required commands to install TensorFlow Object Detection API on Ubuntu in [here](https:\u002F\u002Fgithub.com\u002Ftensorflow\u002Fmodels\u002Fblob\u002Fmaster\u002Fresearch\u002Fobject_detection\u002Fg3doc\u002Finstallation.md).\n  \nIf you are still getting problem about installation after completed the installation of the packet that are given above, please check that [link](https:\u002F\u002Fgithub.com\u002Ftensorflow\u002Fmodels\u002Fblob\u002Fmaster\u002Fresearch\u002Fobject_detection\u002Fg3doc\u002Finstallation.md) out to get detailed info about installation.\n\n---\n\n**How to run the program?**\n\nAfter completing these 4 installation steps that are given at above, you can test the project by one of these commands. Program takes an input argument 'imshow' or 'imwrite':\n\n      python3 vehicle_detection_main.py imshow\n      python3 vehicle_detection_main.py imwrite\n\n- *imshow*  : shows the processed frames as an video on screen.\n- *imwrite* : saves the processed frames as an output video in the project root folder.\n\n---\n\n## Citation\nIf you use this code for your publications, please cite it as:\n\n    @ONLINE{vdtct,\n        author = \"Ahmet Özlü\",\n        title  = \"Vehicle Detection, Tracking and Counting by TensorFlow\",\n        year   = \"2018\",\n        url    = \"https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\"\n    }\n\n## Author\nAhmet Özlü\n\n## License\nThis system is available under the MIT license. See the LICENSE file for more info.\n","# 车辆检测、跟踪与计数\n此示例项目专注于使用 [**TensorFlow Object Counting API**](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Ftensorflow_object_counting_api) 进行“车辆检测、跟踪和计数”。***如果您需要具有超高精度的专业车辆检测、跟踪及计数项目，请联系我们！***\n\n---\n\n***本项目以 [TensorFlow Object Counting API](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Ftensorflow_object_counting_api) 作为对象计数的基础，更多信息可在此 [仓库](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Ftensorflow_object_counting_api) 中找到。***\n\n---\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fahmetozlu_vehicle_counting_tensorflow_readme_5c435cb570e7.gif\">\n\u003C\u002Fp>\n\n---\n\n***开发正在进行中！此示例项目将很快更新，更多优秀的交通分析应用程序将在本仓库中提供！***\n\n---\n\n## 本示例项目的通用功能\n\n此示例项目不仅仅是计数车辆，以下是它的附加功能：\n\n- 车辆的检测和分类（汽车、卡车、自行车、摩托车、公交车）\n- 识别近似车辆颜色\n- 检测车辆行驶方向\n- 预测车辆速度\n- 预测近似车辆尺寸\n- **检测到的车辆图像是从视频帧中裁剪的，并保存为新的图像，位于 \"[detected_vehicles](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Ftree\u002Fmaster\u002Fdetected_vehicles)\" 文件夹路径下**\n- **程序在源视频文件处理结束后输出一个 .csv 文件 ([traffic_measurement.csv](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Fblob\u002Fmaster\u002Ftraffic_measurement.csv))，其中包含“车辆类型\u002F尺寸”、“车辆颜色”、“车辆移动方向”、“车辆速度 (km\u002Fh)\"行。**\n\n待办事项：\n\n- 将分享更强大的检测模型。\n- 将开发示例代码以处理不同类型的输入视频（针对不同类型的道路交通，如双向车道）。\n- 将进行代码清理。\n- 将开发用户界面。 \n\n输入视频可通过此 [链接](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Fblob\u002Fmaster\u002Finput_video.mp4) 访问。\n\n## 原理\n\n### 系统架构\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fahmetozlu_vehicle_counting_tensorflow_readme_724f9cb928f8.png\">\n\u003C\u002Fp>\n\n- 车辆检测和分类是使用 TensorFlow Object Detection API 开发的，[参见](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Fblob\u002Fmaster\u002Fvehicle_detection_main.py) 获取更多信息。\n- 车辆速度预测是使用 OpenCV 通过图像像素操作和计算开发的，[参见](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Ftree\u002Fmaster\u002Futils\u002Fspeed_and_direction_prediction_module) 获取更多信息。\n- 车辆颜色预测是使用 OpenCV 基于 K-近邻 (K-Nearest Neighbors) 机器学习分类算法训练的直方图特征开发的，[参见](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Ftree\u002Fmaster\u002Futils\u002Fcolor_recognition_module) 获取更多信息。\n\n[TensorFlow™](https:\u002F\u002Fwww.tensorflow.org\u002F) 是一个用于数值计算的开源软件库，它使用数据流图。图中的节点代表数学运算，而图的边代表它们之间传递的多维数据数组（张量\u002FTensors）。\n\n[OpenCV (开源计算机视觉库)](https:\u002F\u002Fopencv.org\u002Fabout.html) 是一个开源的计算机视觉和机器学习软件库。OpenCV 旨在为计算机视觉应用提供通用基础设施，并加速机器感知在商业产品中的使用。\n\n### 跟踪器\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fahmetozlu_vehicle_counting_tensorflow_readme_3c81d7ea3ad9.png\" | width=700>\n\u003C\u002Fp>\n\n源视频通过 OpenCV 逐帧读取。每一帧都经过在 TensorFlow 上开发的 [\"SSD with Mobilenet\" 模型](http:\u002F\u002Fdownload.tensorflow.org\u002Fmodels\u002Fobject_detection\u002Fssd_mobilenet_v1_coco_2017_11_17) 进行处理。这是一个循环，持续工作直到视频结束。跟踪器的主要流程如图上方所示。\n\n### 模型\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fahmetozlu_vehicle_counting_tensorflow_readme_516818984034.png\">\n\u003C\u002Fp>\n\n在本项目中，默认我使用 [\"SSD with Mobilenet\" 模型](http:\u002F\u002Fdownload.tensorflow.org\u002Fmodels\u002Fobject_detection\u002Fssd_mobilenet_v1_coco_2017_11_17)。您可以在 [此处](https:\u002F\u002Ftowardsdatascience.com\u002Funderstanding-ssd-multibox-real-time-object-detection-in-deep-learning-495ef744fab) 找到有关 SSD (单发多框检测) 的更多信息。查看 [检测模型库](https:\u002F\u002Fgithub.com\u002Ftensorflow\u002Fmodels\u002Fblob\u002Fmaster\u002Fresearch\u002Fobject_detection\u002Fg3doc\u002Fdetection_model_zoo.md) 以获取其他模型的列表，这些模型开箱即用，具有不同的速度和精度。\n\n*最小车辆检测阈值可以按百分比设置 [在此行](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Ftensorflow_object_counting_api\u002Fblob\u002Fmaster\u002Futils\u002Fvisualization_utils.py#L443)。默认的最小车辆检测阈值为 0.5！*\n\n## 项目演示\n\n该项目的演示视频可在 [我的 YouTube 频道](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=PrqnhHf6fhM) 上观看。\n\n## 安装\n\n**使用 Nvidia GPU（英伟达图形处理器）的 Docker（容器化平台）设置：** 无需安装任何内容，只需 nvidia-docker 即可在 GPU 上运行演示。设置此 Docker 的命令：\n\n    docker-compose up\n\n如果不使用 nvidia-docker，可以参考下方的安装步骤！\n\n**1.) Python 和 pip（Python 包管理工具）**\n\nPython（编程语言）在 Ubuntu（操作系统）上会自动安装。请花点时间确认（通过执行 python -V 命令）您的系统是否已安装以下任一 Python 版本：\n\n- Python 3.3+\n\npip 或 pip3 包管理器通常安装在 Ubuntu 上。请花点时间确认（通过执行 *pip -V* 或 *pip3 -V* 命令）是否已安装 pip 或 pip3。我们强烈建议使用 8.1 或更高版本的 pip 或 pip3。如果未安装 8.1 或更高版本，请执行以下命令，它将安装或升级到最新版本的 pip：\n\n    $ sudo apt-get install python3-pip python3-dev # for Python 3.n\n\n**2.) OpenCV（开源计算机视觉库）**\n\n有关在 Ubuntu 上安装 OpenCV 所需命令，请参阅 [此处](https:\u002F\u002Fgist.github.com\u002Fdynamicguy\u002F3d1fce8dae65e765f7c4)。\n\n**3.) TensorFlow（深度学习框架）**\n\n通过调用以下任一命令安装 TensorFlow：\n\n    $ pip3 install tensorflow     # Python 3.n; CPU support (no GPU support)\n    $ pip3 install tensorflow-gpu # Python 3.n; GPU support\n\n当前程序兼容 TensorFlow 1.5.0 版本。若要使用 TensorFlow 2.x 运行程序，请取消注释这些行：[#1](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Fblob\u002Fmaster\u002Futils\u002Flabel_map_util.py#L117), [#2](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Fblob\u002Fmaster\u002Fvehicle_detection_main.py#L77), [#3](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Fblob\u002Fmaster\u002Fvehicle_detection_main.py#L77), [#4](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Fblob\u002Fmaster\u002Fvehicle_detection_main.py#L78)。\n\n**4.) TensorFlow 目标检测 API（应用程序编程接口）**\n\n有关在 Ubuntu 上安装 TensorFlow 目标检测 API 所需命令，请参阅 [此处](https:\u002F\u002Fgithub.com\u002Ftensorflow\u002Fmodels\u002Fblob\u002Fmaster\u002Fresearch\u002Fobject_detection\u002Fg3doc\u002Finstallation.md)。\n  \n如果在完成上述软件包的安装后仍然遇到安装问题，请查看该 [链接](https:\u002F\u002Fgithub.com\u002Ftensorflow\u002Fmodels\u002Fblob\u002Fmaster\u002Fresearch\u002Fobject_detection\u002Fg3doc\u002Finstallation.md) 以获取详细的安装信息。\n\n---\n\n**如何运行程序？**\n\n完成上述 4 个安装步骤后，您可以通过以下任一命令测试项目。程序需要一个输入参数 'imshow' 或 'imwrite'：\n\n      python3 vehicle_detection_main.py imshow\n      python3 vehicle_detection_main.py imwrite\n\n- *imshow*：将处理后的帧作为视频显示在屏幕上。\n- *imwrite*：将处理后的帧保存为输出视频到项目根文件夹中。\n\n---\n\n## 引用\n如果您在出版物中使用此代码，请按以下方式引用：\n\n    @ONLINE{vdtct,\n        author = \"Ahmet Özlü\",\n        title  = \"Vehicle Detection, Tracking and Counting by TensorFlow\",\n        year   = \"2018\",\n        url    = \"https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\"\n    }\n\n## 作者\nAhmet Özlü\n\n## 许可证\n本系统采用 MIT 许可证。有关更多信息，请参阅 LICENSE 文件。","# vehicle_counting_tensorflow 快速上手指南\n\n本项目是一个基于 **TensorFlow Object Counting API** 的开源工具，专注于车辆的检测、跟踪与计数。它不仅能统计车辆数量，还能识别车型、颜色、行驶方向及预测速度，并支持输出裁剪后的车辆图片和统计数据 CSV 文件。\n\n## 环境准备\n\n- **操作系统**: Linux (Ubuntu 推荐)\n- **Python 版本**: 3.3+\n- **包管理器**: pip 或 pip3 (建议版本 8.1+)\n- **硬件要求**: \n  - CPU 运行即可，但推荐使用 NVIDIA GPU 以获得更好的性能（可通过 Docker 配置）。\n- **核心依赖**:\n  - OpenCV\n  - TensorFlow (兼容 1.5.0，若使用 2.x 需修改部分代码)\n  - TensorFlow Object Detection API\n\n## 安装步骤\n\n### 方案一：使用 Docker (推荐 GPU 用户)\n无需手动安装环境，直接使用 Nvidia-Docker 运行演示：\n\n```bash\ndocker-compose up\n```\n\n### 方案二：手动安装 (Linux\u002FUbuntu)\n\n1. **安装 Python 和 pip**\n   ```bash\n   $ sudo apt-get install python3-pip python3-dev # for Python 3.n\n   ```\n\n2. **安装 OpenCV**\n   参考官方 Gist 获取 Ubuntu 下的安装命令：[OpenCV 安装指南](https:\u002F\u002Fgist.github.com\u002Fdynamicguy\u002F3d1fce8dae65e765f7c4)\n\n3. **安装 TensorFlow**\n   根据是否使用 GPU 选择以下命令之一：\n   ```bash\n   $ pip3 install tensorflow     # Python 3.n; CPU support\n   $ pip3 install tensorflow-gpu # Python 3.n; GPU support\n   ```\n   > **注意**: 当前程序默认兼容 TensorFlow 1.5.0。若使用 TensorFlow 2.x，需取消注释以下文件中的相关行以适配：\n   > - `utils\u002Flabel_map_util.py` (Line 117)\n   > - `vehicle_detection_main.py` (Line 77, 78)\n\n4. **安装 TensorFlow Object Detection API**\n   参考 TensorFlow Models 仓库的安装文档：[TF Object Detection API 安装](https:\u002F\u002Fgithub.com\u002Ftensorflow\u002Fmodels\u002Fblob\u002Fmaster\u002Fresearch\u002Fobject_detection\u002Fg3doc\u002Finstallation.md)\n\n## 基本使用\n\n完成上述安装后，进入项目根目录，通过以下命令运行程序。程序接受一个输入参数 `'imshow'` 或 `'imwrite'`。\n\n**查看实时处理画面：**\n```bash\npython3 vehicle_detection_main.py imshow\n```\n\n**保存处理后的视频文件：**\n```bash\npython3 vehicle_detection_main.py imwrite\n```\n\n**说明：**\n- **输入**: 需要指定输入视频文件（示例视频链接：[input_video.mp4](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Fblob\u002Fmaster\u002Finput_video.mp4)）\n- **输出**: \n  - 处理后的视频保存在项目根目录。\n  - 检测到的车辆图片自动裁剪并保存至 `detected_vehicles` 文件夹。\n  - 统计数据生成 `traffic_measurement.csv` 文件，包含车型、大小、颜色、方向和速度等信息。","某智慧交通项目组正在对城市主干道监控视频进行深度挖掘，旨在评估不同时段的车流密度与通行效率。\n\n### 没有 vehicle_counting_tensorflow 时\n- 依靠人工逐帧回放视频统计车流量，效率极低且极易产生视觉误差。\n- 传统方法仅能记录车辆总数，无法区分车型大小或估算行驶速度。\n- 缺乏结构化数据输出，难以将视频信息转化为可分析的 CSV 报表。\n- 无法自动识别车辆颜色及行驶方向，导致交通流向分析缺失关键维度。\n\n### 使用 vehicle_counting_tensorflow 后\n- vehicle_counting_tensorflow 基于 TensorFlow 实现高精度检测，自动完成全天候车流追踪。\n- 系统不仅能计数，还能预测车速、尺寸及颜色，并生成包含详细指标的 CSV 文件。\n- 自动截取并保存每辆被识别车辆的图片至指定文件夹，方便后续人工复核。\n- 支持判断车辆行驶方向，为双向车道交通流量分析提供了可靠的数据支撑。\n\n通过自动化多维数据分析，显著提升了交通监控的效率与决策精准度。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fahmetozlu_vehicle_counting_tensorflow_977a40cd.png","ahmetozlu","Ozlu","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fahmetozlu_66e2f020.jpg","If you are interested to hire me remotely for your Computer Vision based AI projects, please send me your requirement list and the deadlines via an e-mail!",null,"Brussels","ahmetozlu93@gmail.com","https:\u002F\u002Fahmetozlu.medium.com","https:\u002F\u002Fgithub.com\u002Fahmetozlu",[85,89],{"name":86,"color":87,"percentage":88},"Python","#3572A5",99.6,{"name":90,"color":91,"percentage":92},"Dockerfile","#384d54",0.4,927,362,"2026-04-03T01:04:03","MIT","Linux","支持 NVIDIA GPU（非必需），显存大小及 CUDA 版本未说明","未说明",{"notes":101,"python":102,"dependencies":103},"项目默认基于 TensorFlow 1.5.0 开发，需额外安装 TensorFlow Object Detection API；默认使用 SSD with Mobilenet 检测模型；支持 CPU 或 GPU 模式运行；程序运行后生成车辆统计 CSV 文件及裁剪后的车辆图片；当前项目处于开发更新中","3.3+",[104,105,106],"tensorflow>=1.5.0","opencv-python","tensorflow-object-detection-api",[14,13,51,54,53],[109,110,111,112,113,114,115,116,117,118,119,120,106,121,122,123,124,125,126,127],"vehicle-detection","vehicle-tracking","vehicle-detection-and-tracking","vehicle-counting","color-recognition","speed-prediction","object-detection","object-detection-label","detection","prediction","python","tensorflow","opencv","image-processing","computer-vision","machine-learning","deep-learning","deep-neural-networks","data-science","2026-03-27T02:49:30.150509","2026-04-06T08:52:35.341412",[131,136,141,146,151,156],{"id":132,"question_zh":133,"answer_zh":134,"source_url":135},2257,"Windows 上运行时报错 ModuleNotFoundError: No module named 'utils' 怎么办？","这通常与 Python 版本兼容性有关。请检查 `knn_classifier.py` 文件，将 `open(filename, 'rb')` 改为 `open(filename, 'r')`；同时将 `all_possible_neighbors.iteritems()` 改为 `items()` 以适配 Python 3。此外，确保脚本在正确的目录下运行以识别相对路径。","https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Fissues\u002F13",{"id":137,"question_zh":138,"answer_zh":139,"source_url":140},2258,"如何将 ROI 检测线从水平方向改为垂直方向？","需要修改源代码中的坐标判断逻辑。在 `visualization_utils.py` 第 181 行附近，将 `if(bottom > ROI_POSITION)` 改为判断 `right` 或 `left`。同时在 `speed_prediction.py` 中将 `bottom` 替换为 `right` 或 `left`。建议配合调整 `ROI_POSITION` 的值以适应新的方向。","https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Fissues\u002F18",{"id":142,"question_zh":143,"answer_zh":144,"source_url":145},2259,"为什么项目默认使用 Y 像素？如何自定义 ROI 线来统计不同方向的车辆？","原项目为了简化仅使用了 Y 像素。如果您需要统计沿 X 轴移动的车辆，可以改用 X 像素作为 ROI 线。如果检测到车辆被重复计数（如一辆车算作 2-3 次），说明检测精度不足，建议微调 [COCO 模型](http:\u002F\u002Fdownload.tensorflow.org\u002Fmodels\u002Fobject_detection\u002Fssd_mobilenet_v1_coco_2017_11_17.tar.gz) 以提高准确率，而不是单纯加宽 ROI 线。","https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Fissues\u002F1",{"id":147,"question_zh":148,"answer_zh":149,"source_url":150},2260,"Windows 10 上编译 Protobuf 时提示 \"'protoc' is not recognized\" 如何解决？","请确保已安装 Protocol Buffers 编译器并将 `protoc` 添加到系统环境变量 PATH 中。建议严格遵循项目的 [安装指南](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow#installation)。可以先运行 TensorFlow Object Detection 的官方教程 notebook 验证环境是否完整。","https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Fissues\u002F3",{"id":152,"question_zh":153,"answer_zh":154,"source_url":155},2261,"如何提高车辆检测的准确性和计数稳定性？","不要硬编码边界框位置（lower_bounding_box），否则无法有效追踪车辆。检测结果的波动通常是因为模型在当前场景下不够准确。建议对使用的模型进行迁移学习（Transfer Learning）或微调（Fine-tuning），从而提升检测性能。","https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Fissues\u002F52",{"id":157,"question_zh":158,"answer_zh":159,"source_url":160},2262,"1920x1080 分辨率视频运行时车辆计数始终为 0 怎么办？","需要手动调整 ROI 参数以适应高分辨率。在 `vehicle_counting.py` 中修改变量 'roi'，或在 `object_counting_api.py` 的第 199 和 202 行硬编码 roi 值。如果问题依旧，请检查 [TensorFlow Object Counting API](https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Ftensorflow_object_counting_api) 的相关 Issue 解答。","https:\u002F\u002Fgithub.com\u002Fahmetozlu\u002Fvehicle_counting_tensorflow\u002Fissues\u002F56",[]]