mirror of
https://github.com/opencv/opencv.git
synced 2026-07-28 23:03:03 +04:00
Merge pull request #23766 from TolyaTalamanov:at/segmentation-demo-desync
G-API: Refine Semantic Segmentation Demo #23766 ### Overview * Supported demo working with camera id (e.g `--input=0`) * Supported 3d output segmentation models (e.g `deeplabv3`) * Supported `desync` execution * Supported higher camera resolution * Changed the color map to pascal voc (https://cloud.githubusercontent.com/assets/4503207/17803328/1006ca80-65f6-11e6-9ff6-36b7ef5b9ac6.png) ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [ ] I agree to contribute to the project under Apache 2 License. - [ ] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [ ] The PR is proposed to the proper branch - [ ] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ ] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
committed by
GitHub
parent
134d0b74d3
commit
a371bdac9d
@@ -268,6 +268,11 @@ PyObject* pyopencv_from(const std::vector<Tp>& value)
|
||||
template<typename K, typename V>
|
||||
bool pyopencv_to(PyObject *obj, std::map<K,V> &map, const ArgInfo& info)
|
||||
{
|
||||
if (!obj || obj == Py_None)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
PyObject* py_key = nullptr;
|
||||
PyObject* py_value = nullptr;
|
||||
Py_ssize_t pos = 0;
|
||||
|
||||
@@ -191,13 +191,15 @@ _PREDEFINED_TYPES = (
|
||||
PrimitiveTypeNode.str_())
|
||||
), export_name="SearchParams"),
|
||||
AliasTypeNode.dict_("map_string_and_string", PrimitiveTypeNode.str_("map_string_and_string::key"),
|
||||
PrimitiveTypeNode.str_("map_string_and_string::key::value")),
|
||||
PrimitiveTypeNode.str_("map_string_and_string::value")),
|
||||
AliasTypeNode.dict_("map_string_and_int", PrimitiveTypeNode.str_("map_string_and_int::key"),
|
||||
PrimitiveTypeNode.int_("map_string_and_int::key::value")),
|
||||
PrimitiveTypeNode.int_("map_string_and_int::value")),
|
||||
AliasTypeNode.dict_("map_string_and_vector_size_t", PrimitiveTypeNode.str_("map_string_and_vector_size_t::key"),
|
||||
SequenceTypeNode("map_string_and_vector_size_t::key::value", PrimitiveTypeNode.int_("size_t"))),
|
||||
SequenceTypeNode("map_string_and_vector_size_t::value", PrimitiveTypeNode.int_("size_t"))),
|
||||
AliasTypeNode.dict_("map_string_and_vector_float", PrimitiveTypeNode.str_("map_string_and_vector_float::key"),
|
||||
SequenceTypeNode("map_string_and_vector_float::key::value", PrimitiveTypeNode.float_())),
|
||||
SequenceTypeNode("map_string_and_vector_float::value", PrimitiveTypeNode.float_())),
|
||||
AliasTypeNode.dict_("map_int_and_double", PrimitiveTypeNode.int_("map_int_and_double::key"),
|
||||
PrimitiveTypeNode.float_("map_int_and_double::value")),
|
||||
)
|
||||
|
||||
PREDEFINED_TYPES = dict(zip((t.ctype_name for t in _PREDEFINED_TYPES), _PREDEFINED_TYPES))
|
||||
|
||||
Reference in New Issue
Block a user