text
stringlengths
0
93.6k
'--sequence', '-s',
type=str,
default="00",
required=False,
help='Sequence to visualize. Defaults to %(default)s',
)
parser.add_argument(
'--ignore_images', '-r',
dest='ignore_images',
default=False,
required=False,
action='store_true',
help='Visualize range image projections too. Defaults to %(default)s',
)
parser.add_argument(
'--do_instances', '-i',
dest='do_instances',
default=False,
required=False,
action='store_true',
help='Visualize instances too. Defaults to %(default)s',
)
parser.add_argument(
'--link', '-l',
dest='link',
default=False,
required=False,
action='store_true',
help='Link viewpoint changes across windows. Defaults to %(default)s',
)
parser.add_argument(
'--offset',
type=int,
default=0,
required=False,
help='Sequence to start. Defaults to %(default)s',
)
parser.add_argument(
'--ignore_safety',
dest='ignore_safety',
default=False,
required=False,
action='store_true',
help='Normally you want the number of labels and ptcls to be the same,'
', but if you are not done inferring this is not the case, so this disables'
' that safety.'
'Defaults to %(default)s',
)
parser.add_argument(
'--color_learning_map',
dest='color_learning_map',
default=False,
required=False,
action='store_true',
help='Apply learning map to color map: visualize only classes that were trained on',
)
FLAGS, unparsed = parser.parse_known_args()
# print summary of what we will do
print("*" * 80)
print("INTERFACE:")
print("Labels: ", FLAGS.labels)
print("Config", FLAGS.config)
print("Sequence", FLAGS.sequence)
print("ignore_images", FLAGS.ignore_images)
print("do_instances", FLAGS.do_instances)
print("link", FLAGS.link)
print("ignore_safety", FLAGS.ignore_safety)
print("color_learning_map", FLAGS.color_learning_map)
print("offset", FLAGS.offset)
print("*" * 80)
# open config file
try:
print("Opening config file %s" % FLAGS.config)
CFG = yaml.safe_load(open(FLAGS.config, 'r'))
except Exception as e:
print(e)
print("Error opening yaml file.")
quit()
# fix sequence name
FLAGS.sequence = '{0:02d}'.format(int(FLAGS.sequence))
# does sequence folder exist?
scan_paths = os.path.join(FLAGS.dataset, "sequences", FLAGS.sequence, "velodyne")
if os.path.isdir(scan_paths):
print("Sequence folder a exists! Using sequence from %s" % scan_paths)
else:
print(f"Sequence folder {scan_paths} doesn't exist! Exiting...")
quit()
# populate the pointclouds
scan_names = [os.path.join(dp, f) for dp, dn, fn in os.walk(os.path.expanduser(scan_paths)) for f in fn]
scan_names.sort()
print(len(scan_names))
# does sequence folder exist?