[WIP] experiment/ucn/two-lines-detection#90
Draft
ucn-yushin wants to merge 18 commits into
Draft
Conversation
- line_setup/: ライン座標設定ツール用ディレクトリ - detection/: 車両検知・ライン交差判定用ディレクトリ - result_output/: 結果出力(動画・ログ)用ディレクトリ - data/: 入出力データ用ディレクトリ - requirements.txt: 依存パッケージ定義
- detection/config.py: .envから設定を読み込むConfigクラス - .env.template: 設定ファイルのテンプレート - Line1/Line2のライン座標、駐車場基準点、検知パラメータを管理
- detection/line_crossing.py: LineCrossingDetectorクラス - 外積を使用したライン交差判定 - 車両代表点(bbox底面中央)の取得 - IN/OUT方向の判定 - マージン処理による微小な揺れの無視
- detection/tracker.py: VehicleTrackerクラスとVehicleStateデータクラス - track_id毎の状態管理(Line1/Line2交差情報) - ハイブリッド方式のイベント判定ロジック - 信頼度計算(high/normal) - 古い追跡のクリーンアップ機能 - 統計情報の管理(入庫/出庫/駐車台数)
- line_setup/setup_lines.py: 対話的にライン座標を設定
- OpenCVウィンドウでマウスクリックによる5点設定
- リアルタイムプレビュー表示
- .envファイルへの自動保存
- やり直し機能('r'キー)
- result_output/video_writer.py: VideoAnnotatorクラス - Line1(緑)とLine2(黄色)の描画 - 車両代表点とtrack_idの表示 - カウント情報のオーバーレイ表示 - 処理時間、入出庫数、駐車台数、信頼度別統計の表示
- result_output/event_logger.py: EventLoggerクラス - イベント記録(track_id, 種別, フレーム, タイムスタンプ, 信頼度) - JSON形式での保存(タイムスタンプ付きファイル名) - CSV形式での保存(Excelで開きやすい) - サマリー情報の出力(入出庫数、駐車台数、信頼度別統計)
- main.py: 2ライン検知システムのメインエントリーポイント - YOLOv8トラッキング統合 - フレーム毎のライン交差検知とイベント判定 - ハイブリッド方式による入出庫カウント - アノテーション動画生成 - JSON/CSVログ出力 - コマンドラインインターフェース(動画ファイル/カメラ対応) - 進捗表示とエラーハンドリング
- README.md: 2ライン検知システムの完全なドキュメント - セットアップ手順(依存関係、ライン設定、動画配置) - 使用方法(基本/表示/カメラ/出力先指定) - 出力ファイル形式の説明(JSON/CSV) - 設定パラメータの詳細 - アルゴリズムの解説(外積法、ハイブリッド方式) - トラブルシューティング
- 入力動画ファイル(mp4/avi)を除外 - 出力動画ファイルを除外 - イベントログ(JSON/CSV)を除外
- pyproject.toml: 2ライン検知システムの依存パッケージを追加 - ultralytics, opencv-python, python-dotenv, numpy, torch, torchvision, pandas - README.md: インストール方法をuv syncに変更
Co-authored-by: Copilot <copilot@github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
対応Issue
resolve #88
なぜやったか
何をやったか
どのように実装したか
画面スクリーンショット等
URLスクリーンショット
テスト項目
備考