You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
553B

  1. import multiprocessing as mp
  2. import time
  3. from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor
  4. from multiprocessing import Queue, shared_memory
  5. import tensorrt as trt
  6. # multiprocessing.set_start_method('spawn')
  7. Detweights = "/home/th/tuo_heng/dev/AIlib2/weights/river2/yolov5_2080Ti_fp16.engine"
  8. with open(Detweights, "rb") as f:
  9. model = f.read()
  10. Segweights = "/home/th/tuo_heng/dev/AIlib2/weights/river2/stdc_360X640_2080Ti_fp16.engine"
  11. with open(Segweights, "rb") as f:
  12. segmodel = f.read()
  13. print(type(model), type(segmodel))