Commit
·
16b9d42
1
Parent(s):
2b28fa4
Add files
Browse files- maskal_ws/config/meta.json +51 -0
- modules/move_png_to_ws.sh +13 -5
- setup/install_maskal.sh +1 -1
maskal_ws/config/meta.json
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"lang":"en",
|
3 |
+
"name":"pipeline",
|
4 |
+
"version":"0.0.0",
|
5 |
+
"spacy_version":"",
|
6 |
+
"description":"",
|
7 |
+
"author":"",
|
8 |
+
"email":"",
|
9 |
+
"url":"",
|
10 |
+
"license":"",
|
11 |
+
"spacy_git_version":"ffaead8fe",
|
12 |
+
"vectors":{
|
13 |
+
"width":0,
|
14 |
+
"vectors":0,
|
15 |
+
"keys":0,
|
16 |
+
"name":null
|
17 |
+
},
|
18 |
+
"labels":{
|
19 |
+
"transformer":["person", "roboone"
|
20 |
+
|
21 |
+
],
|
22 |
+
"ner":[
|
23 |
+
"DATASET"
|
24 |
+
]
|
25 |
+
},
|
26 |
+
"pipeline":[
|
27 |
+
"transformer",
|
28 |
+
"ner"
|
29 |
+
],
|
30 |
+
"components":[
|
31 |
+
"transformer",
|
32 |
+
"ner"
|
33 |
+
],
|
34 |
+
"disabled":[
|
35 |
+
|
36 |
+
],
|
37 |
+
"performance":{
|
38 |
+
"ents_f":0.8669950739,
|
39 |
+
"ents_p":0.854368932,
|
40 |
+
"ents_r":0.88,
|
41 |
+
"ents_per_type":{
|
42 |
+
"DATASET":{
|
43 |
+
"p":0.854368932,
|
44 |
+
"r":0.88,
|
45 |
+
"f":0.8669950739
|
46 |
+
}
|
47 |
+
},
|
48 |
+
"transformer_loss":26.4326076445,
|
49 |
+
"ner_loss":559.1205342779
|
50 |
+
}
|
51 |
+
}
|
modules/move_png_to_ws.sh
CHANGED
@@ -1,19 +1,27 @@
|
|
1 |
#!/bin/bash
|
2 |
-
|
3 |
PLAYLIST_URL=https://youtube.com/playlist?list=PLwlIgd6_8FLJqgvIgtUye8Jz2jSKLrCAI
|
4 |
IMAGE_NUM=20
|
5 |
-
|
6 |
-
|
7 |
PLAYLIST_NAME=$(yt-dlp --no-warnings --dump-single-json --playlist-end 1 $PLAYLIST_URL | jq -r '.title')
|
8 |
echo "Playlist Name:" $PLAYLIST_NAME
|
9 |
-
|
10 |
CPU_THREADS=$(grep processor /proc/cpuinfo | wc -l)
|
11 |
RUN_THREADS=$(($CPU_THREADS/2))
|
12 |
echo "cpu threads:$CPU_THREADS"
|
13 |
echo "run threads:$RUN_THREADS"
|
14 |
-
|
15 |
SCRIPT_DIR=$(cd $(dirname $0); pwd)
|
|
|
16 |
mkdir -p $SCRIPT_DIR/../maskal_ws/datasets/train
|
17 |
INPUT_DIR=$SCRIPT_DIR/../generated/$PLAYLIST_NAME
|
18 |
OUTPUT_DIR=$SCRIPT_DIR/../maskal_ws/datasets/train
|
19 |
cp $INPUT_DIR/*.png $OUTPUT_DIR
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
#!/bin/bash
|
2 |
+
### Options
|
3 |
PLAYLIST_URL=https://youtube.com/playlist?list=PLwlIgd6_8FLJqgvIgtUye8Jz2jSKLrCAI
|
4 |
IMAGE_NUM=20
|
5 |
+
### ----- Start script -----
|
6 |
+
### get playlist name
|
7 |
PLAYLIST_NAME=$(yt-dlp --no-warnings --dump-single-json --playlist-end 1 $PLAYLIST_URL | jq -r '.title')
|
8 |
echo "Playlist Name:" $PLAYLIST_NAME
|
9 |
+
### get CPU threads
|
10 |
CPU_THREADS=$(grep processor /proc/cpuinfo | wc -l)
|
11 |
RUN_THREADS=$(($CPU_THREADS/2))
|
12 |
echo "cpu threads:$CPU_THREADS"
|
13 |
echo "run threads:$RUN_THREADS"
|
14 |
+
### get script dir
|
15 |
SCRIPT_DIR=$(cd $(dirname $0); pwd)
|
16 |
+
### Training dataset
|
17 |
mkdir -p $SCRIPT_DIR/../maskal_ws/datasets/train
|
18 |
INPUT_DIR=$SCRIPT_DIR/../generated/$PLAYLIST_NAME
|
19 |
OUTPUT_DIR=$SCRIPT_DIR/../maskal_ws/datasets/train
|
20 |
cp $INPUT_DIR/*.png $OUTPUT_DIR
|
21 |
+
|
22 |
+
### Validation dataset
|
23 |
+
mkdir -p $SCRIPT_DIR/../maskal_ws/datasets/val
|
24 |
+
shuf -zn5 -e *.jpg | xargs -0 cp -vt $SCRIPT_DIR/../maskal_ws/datasets/val
|
25 |
+
### Test dataset
|
26 |
+
mkdir -p $SCRIPT_DIR/../maskal_ws/datasets/test
|
27 |
+
shuf -zn5 -e *.jpg | xargs -0 cp -vt $SCRIPT_DIR/../maskal_ws/datasets/test
|
setup/install_maskal.sh
CHANGED
@@ -27,7 +27,7 @@ pip3 install seaborn
|
|
27 |
pip3 install statsmodels
|
28 |
pip3 install cerberus
|
29 |
pip3 install darwin-py
|
30 |
-
pip3 install pyyaml numpy torch
|
31 |
pip3 install opencv-python pip install opencv-contrib-python
|
32 |
pip3 install tqdm cerberus fvcore torchvision
|
33 |
pip3 install pycocotools==2.0.2
|
|
|
27 |
pip3 install statsmodels
|
28 |
pip3 install cerberus
|
29 |
pip3 install darwin-py
|
30 |
+
pip3 install pyyaml numpy==1.23.1 torch
|
31 |
pip3 install opencv-python pip install opencv-contrib-python
|
32 |
pip3 install tqdm cerberus fvcore torchvision
|
33 |
pip3 install pycocotools==2.0.2
|