Server terminated the session

78 views
Skip to first unread message

zce...@gmail.com

unread,
Aug 21, 2020, 12:31:12 PM8/21/20
to VOT Challenge technical support
Hi,

I am evaluating with vot-toolkit-python and encountered the following issue. Basically during evaluation, every time the tracker needs re-initialization, the evaluation process terminates with log "Error during tracker execution: Server terminated the session ".

Can anyone help with this? I am running on centos 7, Python 3.7, and the dev branch of the toolkit. 

Thanks

Hendrik Bock

unread,
Oct 14, 2020, 7:07:17 PM10/14/20
to VOT Challenge technical support
Hi!

I am having the exact same issue!
When trying to reintialize the server by sending another "initialize"-message, the server immediately terminates the communication with the client. I have tried several trackers and they behave identical in that respect.
When I look into the code of the trackers, I can completely understand why this happens. Here is an excerpt of the critical section which (from my point of view) causes the issue:

handle = vot.VOT("rectangle")  # handles the first "initialize"-message
selection = handle.region()
imagefile = handle.frame()
p = p_config()
image = cv2.cvtColor(cv2.imread(imagefile), cv2.COLOR_BGR2RGB)
tracker = SomeTracker(image, selection, p=p) # creates tracker object with image and region of "initialize" message.

while True:        # in this loop the "frame"-messages are handled.
    imagefile = handle.frame()
    if not imagefile:
        break
    image = cv2.cvtColor(cv2.imread(imagefile), cv2.COLOR_BGR2RGB)
    region, confidence = tracker.tracking(image)
    handle.report(region, confidence)


As you can see, after receiving the first "initialize"-message the trackes goes into an infinite loop to handle the "frame" messages. I can't see in this code how/where a second "initialize"-message would be handled.
In the call "handle.frame" there is a check for the type of message. In case of the reception of an "initialize"-message this call returns "None" - which will then result in the "break" to be executed. And that will terminate the tracker-Server process.

Could somebody please give a hint on how this code is supposed to handle secondary "initialize" messages?

Best regards and many thanks!

Luka Čehovin Zajc

unread,
Oct 15, 2020, 3:00:41 AM10/15/20
to VOT Challenge technical support
The reinitialization of a tracker is a feature of TraX protocol, but it was not supported by VOT wrapper for two reasons: (a) it complicates the code and integration of a wrapper a bit. (b) It creates another opportunity knowingly or unknowingly to transfer some data between runs. Our aim with the wrapper was quick integration and this was a compromise.

The important thing to remember is that you do not have to use VOT wrapper to use the toolkit, you can use TraX directly, take code out of the wrapper and make your own logic to handle reinitializations. I did it multiple times in my work, it is not hard. The VOT wrapper also sends some flags to the toolkit telling it that reinitializations should be coupled with process restart and you can remove all that, the toolkit will adapt. You can also set a restart parameter in tracker config to control this behavior manually.

cheers,

Hendrik Bock

unread,
Oct 15, 2020, 4:57:27 AM10/15/20
to VOT Challenge technical support
Hello Mr. Čehovin,

that perfectly explains the observed behaviour and it is also understandable why you decided against supporting it directly in the Tracker vs. initiating a process restart when a new initialization message is received.
Thank you very much for your time and for clarifying this!

Best regards,
Hendrik Bock
Reply all
Reply to author
Forward
0 new messages