单目3D初始代码
This commit is contained in:
219
tools/feishu_project/skill/feishu-doc/SKILL.md
Executable file
219
tools/feishu_project/skill/feishu-doc/SKILL.md
Executable file
@@ -0,0 +1,219 @@
|
||||
---
|
||||
name: feishu-doc
|
||||
description: Read, create, append, replace, and structurally edit Feishu Docx documents with the feishu_doc tool. Use when Codex needs to work with Feishu docs, cloud docs, docx links, document blocks, tables, images, or file attachments in Feishu/Lark documents.
|
||||
---
|
||||
|
||||
# Feishu Doc
|
||||
|
||||
Use the `feishu_doc` tool for Feishu Docx operations.
|
||||
|
||||
If the current environment does not expose `feishu_doc`, tell the user that the required tool is unavailable and stop instead of inventing a workaround.
|
||||
|
||||
## Extract the doc token
|
||||
|
||||
Extract `doc_token` from the document URL.
|
||||
|
||||
Example:
|
||||
|
||||
- `https://xxx.feishu.cn/docx/ABC123def` -> `ABC123def`
|
||||
|
||||
## Start with the right workflow
|
||||
|
||||
Choose the lightest workflow that fits the request.
|
||||
|
||||
### Read a document
|
||||
|
||||
1. Call `{"action":"read","doc_token":"..."}` first.
|
||||
2. Inspect `hint`, `block_types`, and summary fields in the response.
|
||||
3. If the document contains structured content such as tables or images, call `{"action":"list_blocks","doc_token":"..."}`.
|
||||
4. Use `get_block` only when a single block needs closer inspection.
|
||||
|
||||
### Replace or append text content
|
||||
|
||||
Use markdown-oriented actions for plain document content:
|
||||
|
||||
- `write`: replace the entire document
|
||||
- `append`: append content to the end
|
||||
|
||||
Use markdown for headings, lists, code blocks, quotes, links, and images.
|
||||
|
||||
Do not rely on markdown tables. Use table actions instead.
|
||||
|
||||
### Perform block-level edits
|
||||
|
||||
Use these actions when the user wants targeted updates instead of full-document replacement:
|
||||
|
||||
- `list_blocks`
|
||||
- `get_block`
|
||||
- `update_block`
|
||||
- `delete_block`
|
||||
|
||||
Prefer block-level edits when preserving surrounding content matters.
|
||||
|
||||
## Core actions
|
||||
|
||||
### Read
|
||||
|
||||
```json
|
||||
{ "action": "read", "doc_token": "ABC123def" }
|
||||
```
|
||||
|
||||
### Write the whole document
|
||||
|
||||
```json
|
||||
{ "action": "write", "doc_token": "ABC123def", "content": "# Title\n\nMarkdown content..." }
|
||||
```
|
||||
|
||||
### Append content
|
||||
|
||||
```json
|
||||
{ "action": "append", "doc_token": "ABC123def", "content": "Additional content" }
|
||||
```
|
||||
|
||||
### Create a document
|
||||
|
||||
Always pass the requesting user's `open_id` as `owner_open_id` when available so the user automatically gets access to the new document.
|
||||
|
||||
```json
|
||||
{ "action": "create", "title": "New Document", "owner_open_id": "ou_xxx" }
|
||||
```
|
||||
|
||||
With a folder:
|
||||
|
||||
```json
|
||||
{
|
||||
"action": "create",
|
||||
"title": "New Document",
|
||||
"folder_token": "fldcnXXX",
|
||||
"owner_open_id": "ou_xxx"
|
||||
}
|
||||
```
|
||||
|
||||
### Inspect or edit blocks
|
||||
|
||||
```json
|
||||
{ "action": "list_blocks", "doc_token": "ABC123def" }
|
||||
```
|
||||
|
||||
```json
|
||||
{ "action": "get_block", "doc_token": "ABC123def", "block_id": "doxcnXXX" }
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"action": "update_block",
|
||||
"doc_token": "ABC123def",
|
||||
"block_id": "doxcnXXX",
|
||||
"content": "New text"
|
||||
}
|
||||
```
|
||||
|
||||
```json
|
||||
{ "action": "delete_block", "doc_token": "ABC123def", "block_id": "doxcnXXX" }
|
||||
```
|
||||
|
||||
## Tables
|
||||
|
||||
Use table actions for real Docx tables.
|
||||
|
||||
### Create an empty table
|
||||
|
||||
```json
|
||||
{
|
||||
"action": "create_table",
|
||||
"doc_token": "ABC123def",
|
||||
"row_size": 2,
|
||||
"column_size": 2,
|
||||
"column_width": [200, 200]
|
||||
}
|
||||
```
|
||||
|
||||
Optional: include `parent_block_id` to insert under a specific block.
|
||||
|
||||
### Fill table cells
|
||||
|
||||
```json
|
||||
{
|
||||
"action": "write_table_cells",
|
||||
"doc_token": "ABC123def",
|
||||
"table_block_id": "doxcnTABLE",
|
||||
"values": [
|
||||
["A1", "B1"],
|
||||
["A2", "B2"]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Create and fill a table in one step
|
||||
|
||||
```json
|
||||
{
|
||||
"action": "create_table_with_values",
|
||||
"doc_token": "ABC123def",
|
||||
"row_size": 2,
|
||||
"column_size": 2,
|
||||
"column_width": [200, 200],
|
||||
"values": [
|
||||
["A1", "B1"],
|
||||
["A2", "B2"]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Images and file attachments
|
||||
|
||||
### Upload an image
|
||||
|
||||
Use exactly one of `url` or `file_path`.
|
||||
|
||||
```json
|
||||
{
|
||||
"action": "upload_image",
|
||||
"doc_token": "ABC123def",
|
||||
"url": "https://example.com/image.png"
|
||||
}
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"action": "upload_image",
|
||||
"doc_token": "ABC123def",
|
||||
"file_path": "/tmp/image.png",
|
||||
"parent_block_id": "doxcnParent",
|
||||
"index": 5
|
||||
}
|
||||
```
|
||||
|
||||
For small images, scale the asset before uploading so it displays at a useful size in the document.
|
||||
|
||||
### Upload a file attachment
|
||||
|
||||
Use exactly one of `url` or `file_path`.
|
||||
|
||||
```json
|
||||
{
|
||||
"action": "upload_file",
|
||||
"doc_token": "ABC123def",
|
||||
"url": "https://example.com/report.pdf"
|
||||
}
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"action": "upload_file",
|
||||
"doc_token": "ABC123def",
|
||||
"file_path": "/tmp/report.pdf",
|
||||
"filename": "Q1-report.pdf"
|
||||
}
|
||||
```
|
||||
|
||||
Optional: include `parent_block_id`.
|
||||
|
||||
## Operating rules
|
||||
|
||||
- Start with `read` for unfamiliar documents.
|
||||
- Escalate to `list_blocks` when `read` indicates structured content.
|
||||
- Use `write` only when replacing the full document is intended.
|
||||
- Prefer block-level edits when the user asks for localized changes.
|
||||
- Use table actions instead of markdown tables.
|
||||
- Preserve the user's access by passing `owner_open_id` on document creation when that identity is available.
|
||||
4
tools/feishu_project/skill/feishu-doc/agents/openai.yaml
Executable file
4
tools/feishu_project/skill/feishu-doc/agents/openai.yaml
Executable file
@@ -0,0 +1,4 @@
|
||||
interface:
|
||||
display_name: "Feishu Doc"
|
||||
short_description: "Read and edit Feishu Docx documents with the feishu_doc tool."
|
||||
default_prompt: "Use the feishu_doc tool to read, create, append, and structurally edit Feishu Docx documents when the user asks about Feishu docs, cloud docs, or docx links."
|
||||
214
tools/feishu_project/skill/feishu-project-issue-data/SKILL.md
Executable file
214
tools/feishu_project/skill/feishu-project-issue-data/SKILL.md
Executable file
@@ -0,0 +1,214 @@
|
||||
---
|
||||
name: feishu-project-issue-data
|
||||
description: Use when working in the yolo26-3d repository and the user wants to read Feishu Project issue views, export a view to structured JSON, classify issue data addresses, download issue data, repair affected standard-path downloads, validate case completeness, or run batch inference on downloaded issue data. Covers fp CLI plus tools/feishu_project/export_feishu_view_issues.py, download_issue_data.py/sh, and run_issue_data_inference.py/sh, including the 董颖-G1Q3 workflow.
|
||||
---
|
||||
|
||||
# Feishu Project Issue Data
|
||||
|
||||
Use the repo dev env for Python commands:
|
||||
|
||||
```bash
|
||||
/root/.codex/skills/use-dongying-dev-env/scripts/with-dev-env.sh python ...
|
||||
```
|
||||
|
||||
or:
|
||||
|
||||
```bash
|
||||
/deeplearning_team/ydong/dongying/miniconda/envs/dev/bin/python ...
|
||||
```
|
||||
|
||||
Current repo defaults are documented in [../../feishu_project.md](../../feishu_project.md).
|
||||
|
||||
## When to use
|
||||
|
||||
- Read or verify a Feishu Project issue view with `fp`
|
||||
- Export a view such as `董颖-G1Q3` to structured JSON
|
||||
- Work with `问题数据地址` / `问题数据地址_PDCL`
|
||||
- Analyze issue tag profiles across `目标` / `问题`
|
||||
- Download issue data into the local workspace
|
||||
- Repair historical bad copies that only copied `sigmastar.1`
|
||||
- Check whether downloaded cases are inference-ready
|
||||
- Batch-run exported-model inference on downloaded issue data
|
||||
|
||||
## Core workflow
|
||||
|
||||
### 1. Verify Feishu access and view contents
|
||||
|
||||
Use `fp` directly when the user wants current data.
|
||||
|
||||
```bash
|
||||
fp view list -p <project_key> -u <user_key> -t issue --name "<view_name>"
|
||||
fp workitem list -o json -p <project_key> -u <user_key> --view "<view_name>" --all
|
||||
fp workitem get <issue_id> -o json -p <project_key> -u <user_key> -t issue
|
||||
```
|
||||
|
||||
### 2. Export structured issue JSON
|
||||
|
||||
Use [../../export_feishu_view_issues.py](../../export_feishu_view_issues.py).
|
||||
|
||||
```bash
|
||||
python ../../export_feishu_view_issues.py \
|
||||
--project-key <project_key> \
|
||||
--user-key <user_key> \
|
||||
--view-name "<view_name>" \
|
||||
--output ../../dongying_g1q3_issue_list.json
|
||||
```
|
||||
|
||||
The export should include:
|
||||
|
||||
- `缺陷标签池`
|
||||
- `问题数据地址`
|
||||
- `问题数据地址_PDCL`
|
||||
- `问题发生frameid`
|
||||
|
||||
### 3. Interpret data-address fields
|
||||
|
||||
Treat these as the same download class:
|
||||
|
||||
- pure `ADAS_...::...` clip references
|
||||
- `mdi raw -r ...` commands
|
||||
|
||||
Use this rule:
|
||||
|
||||
- `ADAS_xxx::yyy` is equivalent to `mdi raw -r ADAS_xxx::yyy -s .`
|
||||
|
||||
Standard paths use these normalization rules:
|
||||
|
||||
- rewrite `hfs/project-G1M3` or `project-G1M3` to `G1M3` when needed
|
||||
- if the path ends with `sigmastar.1`, copy the parent case dir
|
||||
- if the path ends with `sigmastar.1/camera4.bin`, copy the case dir above it
|
||||
- if the copied case has no local `test_data/calibs/camera4.json`, sync a shared parent `test_data` directory when present
|
||||
|
||||
### 4. Analyze issue tag profiles
|
||||
|
||||
Use [../../analyze_issue_tag_profile.py](../../analyze_issue_tag_profile.py) directly, or the G1Q3 wrapper
|
||||
[../../run_issue_tag_profile.sh](../../run_issue_tag_profile.sh).
|
||||
|
||||
```bash
|
||||
bash ../../run_issue_tag_profile.sh
|
||||
```
|
||||
|
||||
Defaults:
|
||||
|
||||
- input JSON: `/data1/dongying/Mono3d/G1Q3/feishu_project/exports/dongying_g1q3_issue_list.json`
|
||||
- report root: `/data1/dongying/Mono3d/G1Q3/feishu_project/reports/issue_tag_profile`
|
||||
|
||||
Output is a single HTML profile report with inline SVG donut charts and `场地问题` / `路测问题` toggle views covering:
|
||||
|
||||
- label completeness and multi-label quality
|
||||
- `目标` / `问题` distributions
|
||||
- `目标 x 问题` matrix
|
||||
- function-domain x problem matrix
|
||||
|
||||
Publish the latest HTML to the static intranet site directory with
|
||||
[../../publish_issue_tag_profile_site.sh](../../publish_issue_tag_profile_site.sh).
|
||||
|
||||
```bash
|
||||
bash ../../publish_issue_tag_profile_site.sh
|
||||
```
|
||||
|
||||
To show or serve through a fixed intranet address, pass `INTRANET_HOST` or
|
||||
`PUBLIC_HOST`:
|
||||
|
||||
```bash
|
||||
INTRANET_HOST=192.168.2.169 bash ../../publish_issue_tag_profile_site.sh
|
||||
INTRANET_HOST=192.168.2.169 bash ../../serve_issue_tag_profile_site.sh restart
|
||||
```
|
||||
|
||||
The address must either belong to the current host or be handled by a reverse
|
||||
proxy/static server at that intranet machine.
|
||||
|
||||
Defaults:
|
||||
|
||||
- site root: `/data1/dongying/Mono3d/G1Q3/feishu_project/site`
|
||||
- site index: `/data1/dongying/Mono3d/G1Q3/feishu_project/site/issue_tag_profile/index.html`
|
||||
- example URL: `http://<intranet-host>:8088/issue_tag_profile/`
|
||||
- Nginx example: [../../nginx_issue_tag_profile.conf.example](../../nginx_issue_tag_profile.conf.example)
|
||||
|
||||
If Nginx is not available yet, start a lightweight static server with
|
||||
[../../serve_issue_tag_profile_site.sh](../../serve_issue_tag_profile_site.sh):
|
||||
|
||||
```bash
|
||||
bash ../../serve_issue_tag_profile_site.sh start
|
||||
```
|
||||
|
||||
### 5. Download or repair issue data
|
||||
|
||||
Use [../../download_issue_data.sh](../../download_issue_data.sh) or [../../download_issue_data.py](../../download_issue_data.py).
|
||||
|
||||
Common modes:
|
||||
|
||||
```bash
|
||||
DRY_RUN=1 bash ../../download_issue_data.sh
|
||||
```
|
||||
|
||||
```bash
|
||||
ONLY_REDOWNLOAD_AFFECTED_CASES=1 bash ../../download_issue_data.sh
|
||||
```
|
||||
|
||||
```bash
|
||||
SKIP_MDI=1 bash ../../download_issue_data.sh --issue-id <id>
|
||||
```
|
||||
|
||||
Defaults:
|
||||
|
||||
- download root: `/data1/dongying/Mono3d/G1Q3/feishu_project/downloaded_issue_data`
|
||||
- manifest: `<download_root>/download_manifest.json`
|
||||
|
||||
Use `ONLY_REDOWNLOAD_AFFECTED_CASES=1` to repair old standard-path copies that previously kept only `sigmastar.1`.
|
||||
|
||||
### 6. Validate inference readiness
|
||||
|
||||
Use the same case-resolution rules as [../../../model_inference/adapters/video_dir_inference_utils.py](../../../model_inference/adapters/video_dir_inference_utils.py).
|
||||
|
||||
A valid case must resolve:
|
||||
|
||||
- `*/sigmastar.1/camera4.bin`
|
||||
- a reachable `camera4.json` from one of:
|
||||
- `case_dir/test_data/calibs/camera4.json`
|
||||
- `case_dir.parent/test_data/calibs/camera4.json`
|
||||
- `case_dir/sigmastar.1/calibs/camera4.json`
|
||||
- `case_dir/calibs/camera4.json`
|
||||
|
||||
Prefer validating with the actual inference path-resolution logic instead of ad hoc file checks.
|
||||
|
||||
### 7. Run batch inference on downloaded issue data
|
||||
|
||||
Use [../../run_issue_data_inference.sh](../../run_issue_data_inference.sh) or [../../run_issue_data_inference.py](../../run_issue_data_inference.py).
|
||||
|
||||
```bash
|
||||
DRY_RUN=1 bash ../../run_issue_data_inference.sh
|
||||
```
|
||||
|
||||
```bash
|
||||
bash ../../run_issue_data_inference.sh
|
||||
```
|
||||
|
||||
Behavior:
|
||||
|
||||
- recursively scans the download root for `*/sigmastar.1/camera4.bin`
|
||||
- calls [../../../model_inference/core/run_two_roi_exported_onnx_infer.py](../../../model_inference/core/run_two_roi_exported_onnx_infer.py) with `--video-case-dir`
|
||||
- mirrors the download-tree relative layout into the inference output root
|
||||
|
||||
Defaults:
|
||||
|
||||
- inference root: `/data1/dongying/Mono3d/G1Q3/feishu_project/inference_issue_data`
|
||||
- manifest: `<inference_root>/inference_manifest.json`
|
||||
|
||||
Useful flags:
|
||||
|
||||
- `SKIP_EXISTING=1`
|
||||
- `ENABLE_ATTR=1`
|
||||
- `SAVE_AGGREGATE_PREDICTIONS=1`
|
||||
- `VIDEO_STRIDE=<n>`
|
||||
- `MAX_IMAGES=<n>`
|
||||
|
||||
## Current repo artifacts
|
||||
|
||||
These files are useful outputs, but they are not the source of truth for latest Feishu data:
|
||||
|
||||
- [../../dongying_g1q3_issue_list.json](../../dongying_g1q3_issue_list.json)
|
||||
- [../../dongying_g1q3_data_address_summary.md](../../dongying_g1q3_data_address_summary.md)
|
||||
- [../../dongying_g1q3_data_address_catalog.md](../../dongying_g1q3_data_address_catalog.md)
|
||||
|
||||
If the user asks for latest status, re-query Feishu with `fp` and regenerate outputs instead of trusting stale local exports.
|
||||
Reference in New Issue
Block a user