Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yunhe20 committed Apr 25, 2023
1 parent 23f0b85 commit d738f59
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions prepare_semantickitti.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,7 @@ def generate_dataset(path_list, dataset_name='semantickitti', mode='train', cube
print('----------------')
print('valid patch number:', len(points))
k = np.array(list(key.values()))
# if len(points) == 0 :
if len(points) ==0 or sum(k>50000):
if len(points) == 0:
print(20*'***')
continue

Expand All @@ -183,7 +182,7 @@ def parse_dataset_args():
# minimum points number in each cube when testing
parser.add_argument('--test_min_num', default=100, type=int, help='minimum points number in each cube when testing')
# maximum points number in each cube
parser.add_argument('--max_num', default=50000, type=int, help='maximum points number in each cube')
parser.add_argument('--max_num', default=500000, type=int, help='maximum points number in each cube')

args = parser.parse_args()
return args
Expand All @@ -203,7 +202,7 @@ def parse_dataset_args():
train_path, val_path = train_test_split(train_path, test_size=0.045)
test_path = search_path(dataset_args.data_root, test_seq)

# 3. generate dataset
# 2. generate dataset
generate_dataset(train_path, 'semantickitti', 'train', cube_size=dataset_args.cube_size, min_num=dataset_args.train_min_num,
max_num=dataset_args.max_num, save_path='./data/semantickitti')
generate_dataset(val_path, 'semantickitti', 'val', cube_size=dataset_args.cube_size, min_num=dataset_args.train_min_num,
Expand Down
4 changes: 2 additions & 2 deletions prepare_shapenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def generate_dataset(mode='train', dataset_name='shapenet', cube_size=20, min_nu
print('----------------')
print('valid patch number:', len(points))
k = np.array(list(key.values()))
if len(points) == 0 or sum(k > 50000):
if len(points) == 0:
print(20 * '***')
invalid_path.append(path)
continue
Expand Down Expand Up @@ -267,7 +267,7 @@ def parse_dataset_args():
# minimum points number in each cube when testing
parser.add_argument('--test_min_num', default=100, type=int, help='minimum points number in each cube when testing')
# maximum points number in each cube
parser.add_argument('--max_num', default=50000, type=int, help='maximum points number in each cube')
parser.add_argument('--max_num', default=500000, type=int, help='maximum points number in each cube')

args = parser.parse_args()
return args
Expand Down

0 comments on commit d738f59

Please sign in to comment.