hustvl / VMA

A general map auto annotation framework based on MapTR, with high flexibility in terms of spatial scale and element type
MIT License
210 stars 22 forks source link

how to play demo #16

Closed iwander-all closed 3 months ago

iwander-all commented 3 months ago

you offer commands like :

python demo/cutsom_infer.py {root_directory} 
                            {config_path} \ 
                            {checkpoint_path} \ 
                            --trajectory_sample_num {trajectory_sample_num} \ 
                            --element_type all \ 
                            --out_dir {out_dir} \ 
                            --visualize False 

but what is {root_directory} {config_path} {checkpoint_path} ?

iwander-all commented 3 months ago

Same as issue 15, I cannot run the demo too. And follow demo, I cannot work out too. By the way, where is ckpts.pth, thanks

iwander-all commented 3 months ago

After efforts, I have worked out the test demo. If you want to run ./tools/dist_test.sh ./projects/configs/vma/vma_icurb.py ./path/to/ckpts.pth 8,

the command should be: ./tools/dist_test.sh ./projects/configs/vma_icurb.py ./ckpts/icurb.pth 8

change dist_test.sh with this: PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \ python -m torch.distributed.run --nproc_per_node=$GPUS --master_port=$PORT \ $(dirname "$0")/test.py $CONFIG $CHECKPOINT --launcher pytorch ${@:4} --eval icurb --eval-option show=True show_dir=$(dirname $0)/../visualize_result/,

and in icurb_dataset.py , delete first line in func def show_result(pred_points, out_dir, image_path) like this: # image_path = image_path.replace('tiff', 'jpg')

iwander-all commented 3 months ago

for this demo, the command is:

python ./demo/custom_infer.py ./demo/image_data/ ./projects/configs/vma_res152_e80_line.py ./ckpts/sd_line.pth --trajectory_sample_num 15 --element_type line --out_dir ./demo/out/ --visualize True

python ./demo/custom_infer.py ./demo/image_data/ ./projects/configs/vma_res152_e80_box.py ./ckpts/sd_box.pth --trajectory_sample_num 15 --element_type box --out_dir ./demo/out/ --visualize True

python ./demo/custom_infer.py ./demo/image_data/ ./projects/configs/vma_icurb_backbone_e80_freespace.py ./ckpts/sd_freespace.pth --trajectory_sample_num 15 --element_type freespace --out_dir ./demo/out/ --visualize True

I donot know why trajectory is needed in this demo.