add social distancing figure
This commit is contained in:
parent
4ed80aef19
commit
ebb7a9b840
@ -171,14 +171,14 @@ For more info, run:
|
|||||||
**Examples** <br>
|
**Examples** <br>
|
||||||
An example from the Collective Activity Dataset is provided below.
|
An example from the Collective Activity Dataset is provided below.
|
||||||
|
|
||||||
<img src="docs/frame0038.jpg" width="500"/>
|
<img src="docs/frame0032.jpg" width="500"/>
|
||||||
|
|
||||||
To visualize social distancing run the below, command:
|
To visualize social distancing run the below, command:
|
||||||
```
|
```
|
||||||
python -m monoloco.run predict docs/frame0038.jpg \
|
python -m monoloco.run predict docs/frame0032.jpg \
|
||||||
--social_distance --output_types front bird
|
--social_distance --output_types front bird
|
||||||
```
|
```
|
||||||
<img src="docs/out_frame0038.jpg.front_bird.jpg" width="700"/>
|
<img src="docs/out_frame0032_front_bird.jpg" width="700"/>
|
||||||
|
|
||||||
|
|
||||||
## C) Orientation and Bounding Box dimensions
|
## C) Orientation and Bounding Box dimensions
|
||||||
|
|||||||
BIN
docs/frame0032.jpg
Normal file
BIN
docs/frame0032.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 41 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 42 KiB |
BIN
docs/out_frame0032_front_bird.jpg
Normal file
BIN
docs/out_frame0032_front_bird.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 138 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 125 KiB |
@ -26,7 +26,8 @@ from .activity import show_social
|
|||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
OPENPIFPAF_MODEL = 'https://drive.google.com/uc?id=1b408ockhh29OLAED8Tysd2yGZOo0N_SQ'
|
OPENPIFPAF_MODEL = 'https://drive.google.com/uc?id=1b408ockhh29OLAED8Tysd2yGZOo0N_SQ'
|
||||||
MONOLOCO_MODEL = 'https://drive.google.com/uc?id=1krkB8J9JhgQp4xppmDu-YBRUxZvOs96r'
|
MONOLOCO_MODEL_KI = 'https://drive.google.com/uc?id=1krkB8J9JhgQp4xppmDu-YBRUxZvOs96r'
|
||||||
|
MONOLOCO_MODEL_NU = 'https://drive.google.com/uc?id=1BKZWJ1rmkg5AF9rmBEfxF1r8s8APwcyC'
|
||||||
MONSTEREO_MODEL = 'https://drive.google.com/uc?id=1xztN07dmp2e_nHI6Lcn103SAzt-Ntg49'
|
MONSTEREO_MODEL = 'https://drive.google.com/uc?id=1xztN07dmp2e_nHI6Lcn103SAzt-Ntg49'
|
||||||
|
|
||||||
|
|
||||||
@ -54,18 +55,23 @@ def download_checkpoints(args):
|
|||||||
|
|
||||||
if args.mode == 'keypoints':
|
if args.mode == 'keypoints':
|
||||||
return dic_models
|
return dic_models
|
||||||
elif args.model is not None:
|
if args.model is not None:
|
||||||
|
assert os.path.exists(args.model), "Model path not found"
|
||||||
dic_models[args.mode] = args.model
|
dic_models[args.mode] = args.model
|
||||||
return dic_models
|
return dic_models
|
||||||
elif args.mode == 'mono':
|
if args.mode == 'stereo':
|
||||||
model = os.path.join(torch_dir, 'monoloco_pp-201203-1424.pkl')
|
assert not args.social_distance, "Social distance not supported in stereo modality"
|
||||||
path = MONOLOCO_MODEL
|
|
||||||
dic_models[args.mode] = model
|
|
||||||
else:
|
|
||||||
model = os.path.join(torch_dir, 'monstereo-201202-1212.pkl')
|
|
||||||
path = MONSTEREO_MODEL
|
path = MONSTEREO_MODEL
|
||||||
dic_models[args.mode] = model
|
name = 'monstereo-201202-1212.pkl'
|
||||||
|
elif args.social_distance:
|
||||||
|
path = MONOLOCO_MODEL_NU
|
||||||
|
name = 'monoloco_pp-201207-1350.pkl'
|
||||||
|
else:
|
||||||
|
path = MONOLOCO_MODEL_KI
|
||||||
|
name = 'monoloco_pp-201203-1424.pkl'
|
||||||
|
|
||||||
|
model = os.path.join(torch_dir, name)
|
||||||
|
dic_models[args.mode] = model
|
||||||
if not os.path.exists(model):
|
if not os.path.exists(model):
|
||||||
import gdown
|
import gdown
|
||||||
LOG.info(f'Downloading model (modality: {args.mode}) in {torch_dir}')
|
LOG.info(f'Downloading model (modality: {args.mode}) in {torch_dir}')
|
||||||
|
|||||||
@ -46,7 +46,7 @@ def cli():
|
|||||||
predict_parser.add_argument('--monocolor-connections', default=False, action='store_true',
|
predict_parser.add_argument('--monocolor-connections', default=False, action='store_true',
|
||||||
help='use a single color per instance')
|
help='use a single color per instance')
|
||||||
predict_parser.add_argument('--instance-threshold', type=float, default=None, help='threshold for entire instance')
|
predict_parser.add_argument('--instance-threshold', type=float, default=None, help='threshold for entire instance')
|
||||||
predict_parser.add_argument('--seed-threshold', type=float, default=None, help='threshold for single seed')
|
predict_parser.add_argument('--seed-threshold', type=float, default=0.5, help='threshold for single seed')
|
||||||
predict_parser.add_argument('--disable-cuda', action='store_true', help='disable CUDA')
|
predict_parser.add_argument('--disable-cuda', action='store_true', help='disable CUDA')
|
||||||
predict_parser.add_argument('--focal',
|
predict_parser.add_argument('--focal',
|
||||||
help='focal length in mm for a sensor size of 7.2x5.4 mm. Default nuScenes sensor',
|
help='focal length in mm for a sensor size of 7.2x5.4 mm. Default nuScenes sensor',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user