Jyouhou / UnrealText

Synthetic Scene Text from 3D Engines
MIT License
241 stars 39 forks source link

Can this be run on multiple terminals? #16

Closed sonnguyenasu closed 3 years ago

sonnguyenasu commented 4 years ago

I want to make the image generation faster by running multiple terminal on the code. Is it feasible to do so? I am stuck cuz only one terminal work and the rest are just not responding

Jyouhou commented 4 years ago

You will need to launch several game processes, and assign different ports:

(1) for the game executable:

+---PackagedEnvironment +---SceneName +---Demo +---Binaries +---Linux | Demo | unrealcv.ini

modify unrealcv.ini to assign a new port

(2) on the python side:

replace from unrealcv import client as UnrealCVClient with

from unrealcv import Client UnrealCVClient = Client(('lovalhost', port_id))

where port_id is the new port the same as above

in

https://github.com/Jyouhou/UnrealText/blob/dc8460a8dff37c61d5bf290b013674bb0c42d429/code/DataGenerator/DataGeneratorModule.py#L11

sonnguyenasu commented 4 years ago

thank you for your answer, I think I got problem with the localhost of unrealcv. When I ran 2-3 terminals, the code would be stuck at client.GetAdjusted function usually. Do you have any possible way to work around that?