Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • bob.ip.facedetect bob.ip.facedetect
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • bobbob
  • bob.ip.facedetectbob.ip.facedetect
  • Issues
  • #4
Closed
Open
Issue created Aug 09, 2016 by Tiago de Freitas Pereira@tiago.pereiraOwner

Multi-thread with the same model

When I try to detect face using bob.ip.facedetect.detect_single_face in a multithread program (2 threads here to make it simple) AND sharing the same cascade model, one of the threads raises the following exception.

self.extractor.extract_indexed(bounding_box, self.feature, self.indices[i])
RuntimeError: bob.ip.facedetect.FeatureExtractor - cannot extract indexed features: C++ exception caught: 'argument `x' = 50 is set outside the expected range [1, 48]'

Follow bellow the code that reproduces the issue (Image attached):

import bob.ip.facedetect
import bob.io.base
import threading

cascade = bob.ip.facedetect.default_cascade()
def worker(img):
  print bob.ip.facedetect.detect_single_face(img, cascade=cascade)

threads = []
for i in range(2):
  img = bob.io.base.load("Yoko_Ono_0001.jpg")
  t = threading.Thread(target=worker, args=(img,))  
  threads.append(t)
  t.start()            

Cheers

Yoko_Ono_0001

Assignee
Assign to
Time tracking