fix force complete pose
This commit is contained in:
parent
e10f012dab
commit
22bc820a9c
@ -14,6 +14,7 @@ from PIL import Image
|
||||
import openpifpaf
|
||||
import openpifpaf.datasets as datasets
|
||||
from openpifpaf.predict import processor_factory, preprocess_factory
|
||||
from openpifpaf import decoder, network, visualizer, show
|
||||
|
||||
from .visuals.printer import Printer
|
||||
from .visuals.pifpaf_show import KeypointPainter, image_canvas
|
||||
@ -56,6 +57,16 @@ def factory_from_args(args):
|
||||
else:
|
||||
args.batch_size = 1
|
||||
|
||||
# Make default pifpaf argument
|
||||
args.force_complete_pose = True
|
||||
args.instance_threshold = 0.15
|
||||
|
||||
# Configure
|
||||
decoder.configure(args)
|
||||
network.configure(args)
|
||||
show.configure(args)
|
||||
visualizer.configure(args)
|
||||
|
||||
return args
|
||||
|
||||
|
||||
@ -71,7 +82,6 @@ def predict(args):
|
||||
net = Loco(model=args.model, net=args.net, device=args.device, n_dropout=args.n_dropout, p_dropout=args.dropout)
|
||||
|
||||
# data
|
||||
|
||||
processor, model = processor_factory(args)
|
||||
preprocess = preprocess_factory(args)
|
||||
|
||||
|
||||
@ -1,11 +1,8 @@
|
||||
# pylint: disable=too-many-branches, too-many-statements
|
||||
|
||||
import argparse
|
||||
try:
|
||||
from openpifpaf.network.nets import cli as openpifpaf_cli
|
||||
except ImportError:
|
||||
from openpifpaf.network.factory import cli as openpifpaf_cli
|
||||
from openpifpaf import decoder
|
||||
|
||||
from openpifpaf import decoder, network, visualizer, show
|
||||
|
||||
|
||||
def cli():
|
||||
@ -39,13 +36,13 @@ def cli():
|
||||
help='what to output: json keypoints skeleton for Pifpaf'
|
||||
'json bird front or multi for MonStereo')
|
||||
predict_parser.add_argument('--no_save', help='to show images', action='store_true')
|
||||
predict_parser.add_argument('--show', help='to show images', action='store_true')
|
||||
predict_parser.add_argument('--dpi', help='image resolution', type=int, default=100)
|
||||
predict_parser.add_argument('--force-complete-pose', help='', action ='store_true')
|
||||
|
||||
# Pifpaf
|
||||
openpifpaf_cli(predict_parser)
|
||||
# Pifpaf parsers
|
||||
decoder.cli(predict_parser)
|
||||
network.cli(predict_parser)
|
||||
show.cli(predict_parser)
|
||||
visualizer.cli(predict_parser)
|
||||
predict_parser.add_argument('--scale', default=1.0, type=float, help='change the scale of the image to preprocess')
|
||||
|
||||
# Monoloco
|
||||
@ -55,7 +52,7 @@ def cli():
|
||||
predict_parser.add_argument('--path_gt', help='path of json file with gt 3d localization',
|
||||
default='data/arrays/names-kitti-200615-1022.json')
|
||||
predict_parser.add_argument('--transform', help='transformation for the pose', default='None')
|
||||
predict_parser.add_argument('--z_max', type=int, help='maximum meters distance for predictions', default=100)
|
||||
predict_parser.add_argument('--z_max', type=int, help='maximum meters distance for predictions', default=30)
|
||||
predict_parser.add_argument('--n_dropout', type=int, help='Epistemic uncertainty evaluation', default=0)
|
||||
predict_parser.add_argument('--dropout', type=float, help='dropout parameter', default=0.2)
|
||||
predict_parser.add_argument('--show_all', help='only predict ground-truth matches or all', action='store_true')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user