set xlim and convert images to jpeg

This commit is contained in:
Lorenzo 2020-12-09 14:37:38 +01:00
parent 7beb093a6b
commit 7ae04660ff
8 changed files with 10 additions and 10 deletions

View File

@ -5,14 +5,14 @@ This repository contains the code for two research projects:
1. **MonStereo: When Monocular and Stereo Meet at the Tail of 3D Human Localization** 1. **MonStereo: When Monocular and Stereo Meet at the Tail of 3D Human Localization**
[README](https://github.com/vita-epfl/monstereo/tree/master/docs/MonStereo.md) & [Article](https://arxiv.org/abs/2008.10913) [README](https://github.com/vita-epfl/monstereo/tree/master/docs/MonStereo.md) & [Article](https://arxiv.org/abs/2008.10913)
![monstereo 1](docs/000840_multi.png) ![monstereo 1](docs/000840_multi.jpg)
2. **Perceiving Humans: from Monocular 3D Localization to Social Distancing (MonoLoco++)** 2. **Perceiving Humans: from Monocular 3D Localization to Social Distancing (MonoLoco++)**
[README](https://github.com/vita-epfl/monstereo/tree/master/docs/MonoLoco_pp.md) & [Article](https://arxiv.org/abs/2009.00984) [README](https://github.com/vita-epfl/monstereo/tree/master/docs/MonoLoco_pp.md) & [Article](https://arxiv.org/abs/2009.00984)
![social distancing](docs/pull_sd.png) ![social distancing](docs/social_distancing.jpg)
![monoloco_pp](docs/truck.png) ![monoloco_pp](docs/truck.jpg)
Both projects has been built upon the CVPR'19 project [Openpifpaf](https://github.com/vita-epfl/openpifpaf) Both projects has been built upon the CVPR'19 project [Openpifpaf](https://github.com/vita-epfl/openpifpaf)
for 2D pose estimation and the ICCV'19 project [MonoLoco](https://github.com/vita-epfl/monoloco) for monocular 3D localization. for 2D pose estimation and the ICCV'19 project [MonoLoco](https://github.com/vita-epfl/monoloco) for monocular 3D localization.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 MiB

View File

@ -66,13 +66,13 @@ After downloading model and ground-truth file, a demo can be tested with the fol
--model data/models/ms-200710-1511.pkl --z_max 30 --checkpoint resnet152 --path_gt data/arrays/names-kitti-200615-1022.json --model data/models/ms-200710-1511.pkl --z_max 30 --checkpoint resnet152 --path_gt data/arrays/names-kitti-200615-1022.json
-o data/output` -o data/output`
![Crowded scene](out_000840.png) ![Crowded scene](out_000840.jpg)
`python3 -m monstereo.run predict --glob docs/005523*.png --output_types multi --scale 2 `python3 -m monstereo.run predict --glob docs/005523*.png --output_types multi --scale 2
--model data/models/ms-200710-1511.pkl --z_max 30 --checkpoint resnet152 --path_gt data/arrays/names-kitti-200615-1022.json --model data/models/ms-200710-1511.pkl --z_max 30 --checkpoint resnet152 --path_gt data/arrays/names-kitti-200615-1022.json
-o data/output` -o data/output`
![Occluded hard example](out_005523.png) ![Occluded hard example](out_005523.jpg)
# Preprocessing # Preprocessing
Preprocessing and training step are already fully supported by the code provided, Preprocessing and training step are already fully supported by the code provided,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 584 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 761 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 460 KiB

View File

@ -28,7 +28,7 @@ def show_results(dic_stats, clusters, net, dir_fig, show=False, save=False):
x_max = 31 x_max = 31
y_min = 0 y_min = 0
# y_max = 2.2 # y_max = 2.2
y_max = 3.5 if net == 'monstereo' else 2.6 y_max = 3.5 if net == 'monstereo' else 2.7
xx = np.linspace(x_min, x_max, 100) xx = np.linspace(x_min, x_max, 100)
excl_clusters = ['all', 'easy', 'moderate', 'hard', '49'] excl_clusters = ['all', 'easy', 'moderate', 'hard', '49']
clusters = [clst for clst in clusters if clst not in excl_clusters] clusters = [clst for clst in clusters if clst not in excl_clusters]
@ -76,10 +76,10 @@ def show_spread(dic_stats, clusters, net, dir_fig, show=False, save=False):
assert net in ('monoloco_pp', 'monstereo'), "network not recognized" assert net in ('monoloco_pp', 'monstereo'), "network not recognized"
phase = 'test' phase = 'test'
excl_clusters = ['all', 'easy', 'moderate', 'hard'] excl_clusters = ['all', 'easy', 'moderate', 'hard', '49']
clusters = [clst for clst in clusters if clst not in excl_clusters] clusters = [clst for clst in clusters if clst not in excl_clusters]
x_min = 3 x_min = 3
x_max = 42 x_max = 31
y_min = 0 y_min = 0
plt.figure(2, figsize=FIGSIZE) plt.figure(2, figsize=FIGSIZE)
@ -87,10 +87,10 @@ def show_spread(dic_stats, clusters, net, dir_fig, show=False, save=False):
bbs = np.array([dic_stats[phase][net][key]['std_ale'] for key in clusters[:-1]]) bbs = np.array([dic_stats[phase][net][key]['std_ale'] for key in clusters[:-1]])
xx = np.linspace(x_min, x_max, 100) xx = np.linspace(x_min, x_max, 100)
if net == 'monoloco_pp': if net == 'monoloco_pp':
y_max = 5 y_max = 2.7
color = 'deepskyblue' color = 'deepskyblue'
epis = np.array([dic_stats[phase][net][key]['std_epi'] for key in clusters[:-1]]) epis = np.array([dic_stats[phase][net][key]['std_epi'] for key in clusters[:-1]])
plt.plot(xxs, epis, marker='o', color='coral', label="Combined uncertainty (\u03C3)") plt.plot(xxs, epis, marker='o', color='coral', linewidth=4, markersize=8, label="Combined uncertainty (\u03C3)")
else: else:
y_max = 3.5 y_max = 3.5
color = 'b' color = 'b'