YOLO3-4-Py: Unable to import pydarknet

Hi I am getting following error

`>>> import pydarknet Traceback (most recent call last): File “<stdin>”, line 1, in <module> ImportError: /home/ntweat/Desktop/yolo/PyYOLOV3/pydarknet.cpython-35m-x86_64-linux-gnu.so: undefined symbol: _ZN2cv8fastFreeEPv

`

Thanks for the wrapper

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 21 (10 by maintainers)

Most upvoted comments

@justinas-kazanavicius

  • Can I know the version of Fedora you use?
  • Also, have you made any progress following what @abossenbroek said.

Thanks

@justinas-kazanavicius Time readings taken on webcam_test.py. (Time readings are taken in milliseconds)

Master Branch

('Internal Time:', 0.08028554916381836, ':', 0.06916772574186325)
Total Time: 0.08295273780822754 : 0.07138648479168823
Efficiency: 0.9689190600111561
('Internal Time:', 0.06472063064575195, ':', 0.06827830523252487)
Total Time: 0.06650710105895996 : 0.07041060804514258
Efficiency: 0.9697161710171481
('Internal Time:', 0.06425833702087402, ':', 0.06747431308031082)
Total Time: 0.06623339653015137 : 0.06957516574214434
Efficiency: 0.969804561161671

direct-numpy-to-darknet-image-conversion Branch

('Internal Time:', 0.06983137130737305, ':', 0.06395943462848663)
Total Time: 0.07549619674682617 : 0.0697771673644012
Efficiency: 0.9166241199570011
('Internal Time:', 0.062108755111694336, ':', 0.06358929723501205)
Total Time: 0.06771492958068848 : 0.06936471980765867
Efficiency: 0.9167383276590567
('Internal Time:', 0.06394815444946289, ':', 0.06366106867790222)
Total Time: 0.07091593742370605 : 0.06967496333086814
Efficiency: 0.9136864324648796
  • Internal Time: Time taken by native YOLO3 call internally.
  • Total Time: internal time + additional cost of wrapper
  • Efficiency: Average Internal Time / Average Total Time

Internal time measurement at pydarknet.pyx

        internal_start = time.time()
        network_predict_image(self.net, image.img)
        dets = get_network_boxes(self.net, image.img.w, image.img.h, thresh, hier_thresh, <int*>0, 0, pnum)

        num = pnum[0]
        if (nms > 0):
            do_nms_obj(dets, num, self.meta.classes, nms)

        internal_end = time.time()
        self.average_internal_time = self.average_internal_time * 0.8 + (internal_end-internal_start) * 0.2
        print("Internal Time:",internal_end-internal_start, ":", self.average_internal_time)

Total time measurement at webcam_test.py

            start_time = time.time()

            # Only measure the time taken by YOLO and API Call overhead

            dark_frame = Image(frame)
            results = net.detect(dark_frame)
            del dark_frame

            end_time = time.time()
            average_time = average_time * 0.8 + (end_time-start_time) * 0.2

            print("Total Time:", end_time-start_time, ":", average_time)
            print("Efficiency:", net._get_average_time()/average_time)

@justinas-kazanavicius gcc: error: : No such file or directory seems kind of strange. Usually these kind of gcc errors are reported in the format gcc:error:[file_name]:No such file or directory. But in your case, the results suggests that gcc is looking for a file with a [space] name. I will look further into this and get back to you.

Based on the ld error your LD_LIBRARY_PATH variable seems not to point to a location where opencv is installed. How did you install opencv?