Skip to content

Commit

Permalink
mini fix (#5662)
Browse files Browse the repository at this point in the history
FileNotFoundError: Could not find module

Co-authored-by: Stefano Sinigardi <[email protected]>
  • Loading branch information
dekkmarsvin and cenit authored Aug 26, 2023
1 parent 68100fb commit 2fa6307
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions darknet.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def detect_image(network, class_names, image, thresh=.5, hier_thresh=.5, nms=.45
elif os.name == "nt":
cwd = os.path.dirname(__file__)
os.environ["PATH"] = os.path.pathsep.join((cwd, os.environ["PATH"]))
lib = ct.CDLL("darknet.dll", ct.RTLD_GLOBAL)
lib = ct.CDLL("darknet.dll", winmode = 0, mode = ct.RTLD_GLOBAL)
else:
lib = None # Intellisense
print("Unsupported OS")
Expand Down Expand Up @@ -358,4 +358,3 @@ def detect_image(network, class_names, image, thresh=.5, hier_thresh=.5, nms=.45
network_predict_batch.argtypes = (ct.c_void_p, IMAGE, ct.c_int, ct.c_int, ct.c_int,
ct.c_float, ct.c_float, IntPtr, ct.c_int, ct.c_int)
network_predict_batch.restype = DETNUMPAIRPtr

0 comments on commit 2fa6307

Please sign in to comment.