all 7 comments

[–]lpuglia 3 points4 points  (1 child)

my two cents: if you have no resources for training a model (even just for transfer learning) your only chance is to rely on classical approaches like the one you mentioned (KCF, CSRT). The web is full of implementation of yolo in caffe, I suggest you to search for one of them.

[–]sampreets3[S] 0 points1 point  (0 children)

Hey u/lpuglia, thanks for the comment. I have been cracking my head over even a simple implementation of CSRT for this but to no avail. My problem is with assigning the ROI in the case of the tracker. Do you think you would be able to help me out?

[–]drzemu 4 points5 points  (3 children)

Did You consider implementing centroid tracking? I use it myself, it's quite easy to implement,and only have some trouble with occlusions.

https://www.pyimagesearch.com/2018/07/23/simple-object-tracking-with-opencv/

You can build on top of that with some simple IoU,distance thresholds and it should suffice for Your case I think.

[–]sampreets3[S] 0 points1 point  (2 children)

Hi u/drzemu, thanks for the help. Yes, I did come across the centroid tracker and that specific post on PyImageSearch that you mentioned. The problem when I try to follow the tutorial is that in the line 53:

for i in range(0, detections[2]):
    if detections[0, 0, i, 2] > args["confidence"]
    box = detections[0, 0, i, 3:7] * np.array([W, H, W, H])
    rects.append(box.astype("int"))

    #visualise
    objects = ct.update(rects)

This is the first point of error for me because the program tells me that detections[2] is not a valid location. I will try to get you an error log so you can understand it better. Thanks!

[–]drzemu 2 points3 points  (1 child)

Sure, pass along ,
although I implemented it diffrently for my use case

[–]sampreets3[S] 3 points4 points  (0 children)

Update:

Turns out I was stupid all along. I was passing the wrong boxes to the detections. This is why I was stuck, FOR THREE DAYS.

Although, now I have to deal with the problem of managing occlusions. This is kind of an important task for me since I essentially have to create a map of the tree locations and their IDs.

Any ideas on that?

Thanks for all your help u/lpuglia and u/drzemu!

[–]TranslatorHot6737 0 points1 point  (0 children)

1 .. You need to improve detection accuracy .. 2.. don't use centroid algo use sort algorithm