forked from CoinCheung/BiSeNet
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
90de8f9
commit 9ff609a
Showing
14 changed files
with
110 additions
and
13 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
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 +1 @@ | ||
/data2/zzy/.datasets/cityscapes//gtFine/ | ||
/data/zzy/zzy/cityscapes/cityscapes/gtFine/ |
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 +1 @@ | ||
/data2/zzy/.datasets/cityscapes//leftImg8bit/ | ||
/data/zzy/zzy/cityscapes/cityscapes/leftImg8bit/ |
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 @@ | ||
/data/zzy/zzy/coco/images/train2017/ |
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 @@ | ||
/data/zzy/zzy/coco/images/val2017/ |
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 @@ | ||
/data/zzy/zzy/coco/labels/train2017/ |
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 @@ | ||
/data/zzy/zzy/coco/labels/val2017/ |
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,6 @@ | ||
|
||
export CUDA_VISIBLE_DEVICES=6,7 | ||
PORT=52330 | ||
NGPUS=2 | ||
|
||
python -m torch.distributed.launch --nproc_per_node=$NGPUS tools/train_amp.py --model bisenetv2 --port $PORT |
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,42 @@ | ||
|
||
import os | ||
import os.path as osp | ||
|
||
|
||
def gen_coco(): | ||
''' | ||
root_path: | ||
|- images | ||
|- train2017 | ||
|- val2017 | ||
|- labels | ||
|- train2017 | ||
|- val2017 | ||
''' | ||
root_path = '/datasets/coco' | ||
save_path = './datasets/coco/' | ||
for mode in ('train', 'val'): | ||
im_root = osp.join(root_path, f'images/{mode}2017') | ||
lb_root = osp.join(root_path, f'labels/{mode}2017') | ||
|
||
ims = os.listdir(im_root) | ||
lbs = os.listdir(lb_root) | ||
|
||
print(len(ims)) | ||
print(len(lbs)) | ||
|
||
im_names = [el.replace('.jpg', '') for el in ims] | ||
lb_names = [el.replace('.png', '') for el in lbs] | ||
common_names = list(set(im_names) & set(lb_names)) | ||
|
||
lines = [ | ||
f'images/{mode}2017/{name}.jpg,labels/{mode}2017/{name}.png' | ||
for name in common_names | ||
] | ||
|
||
with open(f'{save_path}/{mode}.txt', 'w') as fw: | ||
fw.write('\n'.join(lines)) | ||
|
||
|
||
|
||
gen_coco() |
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