Commit ff8ebb8ac626dce1ed991d8887f8ce86d0795d64
1 parent
f04a4fa4
Fix -multiProcess enroll and compare
Sadly, using setPropertyRecursive to set things interacts poorly with ProcessWrapper (because child processes are constructed as needed, using a string to build their algorithms) so drop that for now.
Showing
1 changed file
with
5 additions
and
5 deletions
openbr/core/core.cpp
| ... | ... | @@ -168,9 +168,9 @@ struct AlgorithmCore |
| 168 | 168 | downcast->init(); |
| 169 | 169 | } |
| 170 | 170 | else { |
| 171 | - pipeDesc = "ProcessWrapper("+transformString+")"+pipeDesc; | |
| 171 | + pipeDesc = "ProcessWrapper("+transformString+")+"+pipeDesc; | |
| 172 | 172 | if (fileExclusion) |
| 173 | - pipeDesc = "FileExclusion(" + gallery.flat() +")" + pipeDesc; | |
| 173 | + pipeDesc = "FileExclusion(" + gallery.flat() +")+" + pipeDesc; | |
| 174 | 174 | |
| 175 | 175 | basePipe.reset(Transform::make(pipeDesc,NULL)); |
| 176 | 176 | } |
| ... | ... | @@ -436,10 +436,11 @@ struct AlgorithmCore |
| 436 | 436 | // Incoming templates are compared against the templates in the gallery, and the output is the resulting score |
| 437 | 437 | // vector. |
| 438 | 438 | QString compareRegionDesc; |
| 439 | + | |
| 439 | 440 | if (this->galleryCompareString.isEmpty() ) |
| 440 | - compareRegionDesc = "Pipe([GalleryCompare("+Globals->algorithm+")])"; | |
| 441 | + compareRegionDesc = "Pipe([GalleryCompare("+Globals->algorithm+",galleryName="+colEnrolledGallery.flat()+")])"; | |
| 441 | 442 | else |
| 442 | - compareRegionDesc = "Pipe(["+galleryCompareString+"])"; | |
| 443 | + compareRegionDesc = "Pipe(["+galleryCompareString+"(galleryName="+colEnrolledGallery.flat()+")])"; | |
| 443 | 444 | |
| 444 | 445 | QScopedPointer<Transform> compareRegion; |
| 445 | 446 | // If we need to enroll the row set, we add the current algorithm's enrollment transform before the |
| ... | ... | @@ -469,7 +470,6 @@ struct AlgorithmCore |
| 469 | 470 | // At this point, compareRegion is a transform, which optionally does enrollment, then compares the row |
| 470 | 471 | // set against the column set. If in multi-process mode, the enrollment and comparison are wrapped in a |
| 471 | 472 | // ProcessWrapper transform, and will be transparently run in multiple processes. |
| 472 | - compareRegion->setPropertyRecursive("galleryName", colEnrolledGallery.flat()); | |
| 473 | 473 | |
| 474 | 474 | // We also need to add Output and progress counting to the algorithm we are building, so we will assign them to |
| 475 | 475 | // two stages of a pipe. | ... | ... |