링크가 복사됨
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hi @Jessica, @chicagobob123, @znmeb
No special hardware is required to use multiple NCS devices. A standard USB hub will work for this. Your software will need to handle each device by feeding it input and retrieving inferences from it.
Neal
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
@chicagobob123 the concept of scaling is quite simple - every device that's plugged into your host machine gets a zero-index unique ID, which can be used to reference a specific stick while calling any of the MvNC APIs. Use EnumerateDevices
function to get a list of devices, which can be used with the Device class to generate a handle. Here's a code snippet to help you get started:
from mvnc import mvncapi as mvnc
devices = mvnc.EnumerateDevices()
devHandle.append(mvnc.Device(devices[devnum]))
devHandle[devnum].OpenDevice()
You can now use devHandle
to perform any operations on a specific device.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hi@AshwinVijayakumar
In order to use 4 movidius sticks at the same time, I changed a part of the code of classification_example.py as follows.
devHandle.append(mvnc.Device(devices[0]))
devHandle.append(mvnc.Device(devices[1]))
devHandle.append(mvnc.Device(devices[2]))
devHandle.append(mvnc.Device(devices[3]))
devHandle[0].OpenDevice()
devHandle[1].OpenDevice()
devHandle[2].OpenDevice()
devHandle[3].OpenDevice()
However, inference time does not change.
Is this code correct? Please give me some advices.
Thanks.
hide
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Can you please paste your complete code here. The trick is to send four images, one to each stick using LoadTensor and then trying to get the result back from each stick using GetResult()
Hope this code below helps
def runparallel(count=100, num=[]):
numdevices = num
if len(num) == 0: numdevices = range(len(devices))
for i in range(count):
# *****************************************************************
# Load the Tensor to each of the devices
# *****************************************************************
for devnum in numdevices:
img = choice(imgarr)
graphHandle[devnum].LoadTensor(img, 'user object')
# *****************************************************************
# Read the result from each of the devices
# *****************************************************************
for devnum in numdevices:
tensor, userobj = graphHandle[devnum].GetResult()
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
I have opened a pull request at: https://github.com/duangenquan/YoloV2NCS/pull/6
Enable multiple NCS devices to improve the throughput, hope this helps.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
My previous pull request was merged, visit this link for details: https://github.com/duangenquan/YoloV2NCS
