--- tags: event --- ## 開機之後要做的事情 ```bash cd /opt/aira/aws-ai-summit-2024 make up # 主程式 cd /opt/aira/aws-ai-summit-2024/livecapture/ # 抓拍 ./start cd /opt/aira/airaTrack # 人臉搜尋引擎 ./start ``` ## 設定 ### 設定來源攝影機 #### 位置 /opt/aira/aws-ai-summit-2024/livecapture/airatrack.conf #### 說明 在 `live_channel_list` 裡面可以增加/刪除/編輯來源攝影機。 包括攝影機的網址、埠號、帳號密碼、Sensitivity 等。 #### 可用指令 ```bash # cd /opt/aira/aws-ai-summit-2024/livecapture ./start # 開始 live capture ./stop # 停止 live capture ./restart # 重啟 live capture <-- 更改設定後執行這個就可以 ``` ### 更改服務 IP 記得在 `/opt/aira/aws-ai-summit-2024/.env` 更新 Private IP。 然後要重新簽署 SSL 憑證並重新啟動主程式 ```bash cd /opt/aira/aws-ai-summit-2024 make cert make restart ``` ### 設定身份匹配分數門檻 這個比較不會動到: #### 位置 /opt/aira/aws-ai-summit-2024/livecapture/.env #### 說明 `THRESHOLD` 會決定當分數多少時,認定當前的照片和正在比對的照片是不是同一個人。 > 注意: > 1. 開頭有底線。 > 2. 可用的分數:_70, _71, _72 ...., _98, _99。 #### 可用指令 ```bash # cd /opt/aira/aws-ai-summit-2024 make restart # <-- 更改設定後執行這個就可以 ``` ## 清空/重置資料的方法(五個步驟) ### 1. 停用 livecapture ```bash cd /opt/aira/aws-ai-summit-2024/livecapture ./stop ``` ### 2. 清理向量資料庫 連到 http://127.0.0.1:6335/dashboard 把 `faces` 表 drop 掉,然後執行(按 Run): ``` PUT /collections/faces { "vectors": { "size": 512, "distance": "Cosine" } } ``` ### 3. 清理 mongo 透過 mongo compass 打開資料庫。 按一下 `aws-ai-summit-2024` 資料庫旁邊的垃圾桶,然後確認操作。 ### 4. 清理圖片 ```bash cd /opt/aira/aws-ai-summit-2024 rm -rf storage/images/* # <------- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ``` ### 5. 重新執行 livecapture ```bash cd /opt/aira/aws-ai-summit-2024/livecapture ./start ``` ## 監控 可以在 `/opt/aira/monitoring` 啟動監控程式 ```bash cd /opt/aira/monitoring make up ``` 然後在 http://127.0.0.1:3000/d/adrewv4ducpvkb/cpu-memory-disk-usage?orgId=1 看到主機的運作情形。 ![image](https://hackmd.io/_uploads/BkaWPfpwR.png) ### 其他可供 Debug 的資訊 #### 查看 logs 攝影機有抓到照片、正常運作時會看到: ![image](https://hackmd.io/_uploads/SkLHUooP0.png) 否則只會看到 Server 跑在某個 IP:Port 的訊息。 ```bash cd /opt/aira/aws-ai-summit-2024 make logs ``` #### 查看捕捉到的圖片 ![image](https://hackmd.io/_uploads/Hk0bvsoDC.png) 在 `https://主機:8084/images/` 可以看到所以捕捉到的圖片。 在 `https://主機:8084/images/queries/` 可以看到現場平板用來查詢參訪紀錄的圖片。 #### 取得圖片 base 64 encode 內容 ```bash curl -s 圖片網址 | base64 ```