-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
48 changed files
with
1,316 additions
and
187 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
title: llama.cpp | ||
--- | ||
|
||
# llama.cpp | ||
|
||
- [ggerganov/llama.cpp](https://github.com/ggerganov/llama.cpp) | ||
- MIT, C++ | ||
- LLM inference in C/C++ | ||
|
||
```bash | ||
# AlpineLinux py for ML | ||
apk add \ | ||
gcc g++ python3 py3-pip musl-dev cmake make pkgconf build-base \ | ||
git openssh-client binutils coreutils util-linux findutils sed grep tar wget curl neofetch \ | ||
rust cargo python3-dev openssl-dev linux-headers | ||
|
||
# llama.cpp | ||
# ========= | ||
git clone https://github.com/ggerganov/llama.cpp.git | ||
cd llama.cpp | ||
make -j | ||
|
||
./main -m ./models/7B/ggml-model-q4_0.bin -p "Building a website can be done in 10 simple steps:" -n 512 | ||
./main -m ./models/7B/ggml-model-q4_0.bin --file prompts/alpaca.txt --instruct --ctx_size 2048 --keep -1 | ||
|
||
./main -m ./models/ggml-alpaca-7b-q4.bin --color -f ./prompts/alpaca.txt -ins -b 256 --top_k 10000 --temp 0.2 --repeat_penalty 1 -t 7 | ||
``` |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
tags: | ||
- Automachine | ||
--- | ||
|
||
# Agent | ||
|
||
- Components | ||
- Tools | ||
- Agent Core | ||
- Planing | ||
- with Feedback | ||
- without Feedback | ||
- Memory | ||
- short | ||
- long | ||
- hybrid | ||
- usecase | ||
- Conversational | ||
- Task Oriented | ||
- Creative | ||
- Collaborative | ||
|
||
--- | ||
|
||
- https://www.truefoundry.com/blog/llm-agents |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
--- | ||
tags: | ||
- Glossary | ||
- Glossary | ||
--- | ||
|
||
# LLM Glossary | ||
|
||
|
||
| en | for | cn | notes | | ||
| ---- | ---------------------------- | ----------------- | --------------- | | ||
| GGML | GPT-Generated Model Language | | Georgi Gerganov | | ||
| GGUF | GPT-Generated Unified Format | GPT生成的统一格式 | |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
title: Dataset | ||
--- | ||
|
||
# Dataset | ||
|
||
- https://roboflow.com/formats | ||
- https://github.com/ultralytics/yolov5/blob/master/data/coco128.yaml | ||
- coco128 | ||
- YOLOv5 Tutorial Dataset | ||
- https://www.kaggle.com/datasets/ultralytics/coco128 | ||
- https://github.com/ultralytics/yolov5/blob/master/data/coco128.yaml | ||
- https://ultralytics.com/assets/coco128.zip | ||
- [ultralytics/JSON2YOLO](https://github.com/ultralytics/JSON2YOLO) | ||
- Convert JSON annotations into YOLO format |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
--- | ||
title: Label Studio | ||
--- | ||
|
||
# Label-studio | ||
|
||
- [HumanSignal/label-studio](https://github.com/HumanSignal/label-studio) | ||
- Apache-2.0 | ||
- 数据库: SQLite, PostgreSQL | ||
- 存储: S3 | ||
- telementry | ||
- COLLECT_ANALYTICS | ||
- 参考 | ||
- https://labelstud.io/ | ||
- 前端 https://github.com/HumanSignal/label-studio/tree/develop/web/libs/editor | ||
|
||
```bash | ||
pip install -U label-studio | ||
label-studio | ||
|
||
# https://hub.docker.com/r/heartexlabs/label-studio | ||
# https://github.com/HumanSignal/label-studio/blob/develop/docker-compose.yml | ||
docker run --rm -it \ | ||
-p 8080:8080 \ | ||
-v $PWD/data:/label-studio/data \ | ||
--name label-studio heartexlabs/label-studio | ||
|
||
# label-studio --log-level DEBUG | ||
|
||
LABEL_STUDIO_BASE_DATA_DIR=$PWD/data \ | ||
LABEL_STUDIO_LOCAL_FILES_SERVING_ENABLED=true \ | ||
LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT=$PWD/files \ | ||
label-studio start | ||
``` | ||
|
||
| env | flags | default | | ||
| ---------------------------------------- | ----------------------------- | ---------------------- | | ||
| LABEL_STUDIO_DATABASE | -db,--database | label_studio.sqlite3 | | ||
| LABEL_STUDIO_BASE_DATA_DIR | --data-dir | | ||
| CONFIG_PATH | -c,--config | default_config.json | | ||
| LABEL_STUDIO_LABEL_CONFIG | -l,--label-config | None | | ||
| LABEL_STUDIO_PORT | -p,--port | 8080 | | ||
| LABEL_STUDIO_HOST | --host | | ||
| LABEL_STUDIO_PROJECT_DESC | --initial-project-description | | ||
| LABEL_STUDIO_PASSWORD | --password | | ||
| LABEL_STUDIO_USERNAME | --username | default_user@localhost | | ||
| LABEL_STUDIO_USER_TOKEN | --user-token | | ||
| LABEL_STUDIO_LOCAL_FILES_SERVING_ENABLED | | False | | ||
| LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT | | / | | ||
|
||
## tags | ||
|
||
|
||
```xml | ||
<View> | ||
<TimeSeriesLabels name="label" toName="ts"> | ||
<Label value="Run"/> | ||
<Label value="Walk"/> | ||
</TimeSeriesLabels> | ||
<HyperText name="video" value="$video" inline="true"/> | ||
<TimeSeries name="ts" value="$csv" valueType="url" timeColumn="time_column"> | ||
<Channel column="first_column"/> | ||
</TimeSeries> | ||
</View> | ||
|
||
<!-- { | ||
"csv": "/samples/time-series.csv?time=time_column&values=first_column", | ||
"video": "<video src='/static/samples/opossum_snow.mp4' width='100%' controls onloadeddata=\"setTimeout(function(){ts=Htx.annotationStore.selected.names.get('ts');t=ts.data.time_column;v=document.getElementsByTagName('video')[0];w=parseInt(t.length*(5/v.duration));l=t.length-w;ts.updateTR([t[0], t[w]], 1.001);r=$=> | ||
ts.brushRange.map(n=>(+n).toFixed(2));_=r();setInterval($=>r().some((n,i)=>n!==_[i])&&(_=r())&&(v.currentTime=v.duration*(r()[0]-t[0])/(t.slice(-1)[0]-t[0]-(r()[1]-r()[0]))),300); console.log('video is loaded, starting to sync with time series')}, 3000); \" />" | ||
} --> | ||
``` | ||
|
||
- Video+TimeSerias | ||
- https://github.com/HumanSignal/label-studio/issues/4827 | ||
- https://labelstud.io/tags/ | ||
- https://github.com/google-research-datasets/Video-Timeline-Tags-ViTT | ||
|
||
## structs | ||
|
||
```ts | ||
interface Obj { | ||
id: string; | ||
|
||
data:any | ||
value:any | ||
|
||
from_name: string; | ||
to_name: string; | ||
type: string; | ||
} | ||
``` | ||
|
||
# FAQ | ||
|
||
## video frameCount | ||
|
||
- framerate 默认 24 | ||
- https://github.com/HumanSignal/label-studio/issues/3315 | ||
- https://labelstud.io/tags/video |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: LabelImg | ||
--- | ||
|
||
# LabelImg | ||
|
||
- ~~[HumanSignal/labelImg](https://github.com/HumanSignal/labelImg)~~ | ||
- MIT, Python | ||
- -> [Label Studio](./label-studio.md) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
--- | ||
title: Labeling | ||
--- | ||
|
||
# Labeling | ||
|
||
- VOC - Visual Object Classes | ||
- Pascal VOC | ||
- XML | ||
- object, name, bndbox | ||
- COCO | ||
- Common Objects in Context | ||
- JSON | ||
- images, annotations, categories | ||
- bbox - `[x, y, w, h]` | ||
- YOLO - You Only Look Once | ||
- `<class_index> <x_center> <y_center> <width> <height>` | ||
- 参考 | ||
- https://github.com/KKKSQJ/DeepLearning/tree/master/others/label_convert | ||
|
||
## VOC | ||
|
||
```xml | ||
<annotation> | ||
<folder>VOC2012</folder> | ||
<filename>image1.jpg</filename> | ||
<size> | ||
<width>800</width> | ||
<height>600</height> | ||
<depth>3</depth> | ||
</size> | ||
<object> | ||
<name>dog</name> | ||
<pose>Unspecified</pose> | ||
<truncated>0</truncated> | ||
<difficult>0</difficult> | ||
<bndbox> | ||
<xmin>48</xmin> | ||
<ymin>240</ymin> | ||
<xmax>195</xmax> | ||
<ymax>371</ymax> | ||
</bndbox> | ||
</object> | ||
</annotation> | ||
|
||
``` | ||
|
||
## COCO | ||
|
||
```json | ||
{ | ||
"images": [ | ||
{ | ||
"id": 1, | ||
"file_name": "image1.jpg", | ||
"width": 800, | ||
"height": 600 | ||
} | ||
], | ||
"annotations": [ | ||
{ | ||
"id": 1, | ||
"image_id": 1, | ||
"category_id": 18, | ||
"bbox": [48, 240, 147, 131], | ||
"segmentation": [], | ||
"area": 19257, | ||
"iscrowd": 0 | ||
} | ||
], | ||
"categories": [ | ||
{ | ||
"id": 18, | ||
"name": "dog", | ||
"supercategory": "animal" | ||
} | ||
] | ||
} | ||
``` |
Oops, something went wrong.