Git Product home page Git Product logo

Comments (2)

amoudgl avatar amoudgl commented on August 21, 2024

@breezelj Hi, thanks for pointing out the issue. I also noticed that there is minor difference between bounding boxes produced by evaluate.py and demo.py.

# OTB Man sequence 0002 result
69.457,46.669,26.011,39.444  # demo.py
69.459,46.294,26.026,39.786  # evaluate.py

I recently digged into this issue and found out that got10k toolkit (evaluate.py) uses PIL to read images. On the other hand, my demo.py script reads images using opencv. There is a slight difference between pixel values of opencv and PIL images, which leads to different results. The following script reproduces this fact:

import numpy as np
import cv2
from PIL import Image
path = 'data/OTB/Man/img/0001.jpg'
cv2_img = cv2.imread(path)
cv2_img = cv2.cvtColor(cv2_img, cv2.COLOR_BGR2RGB)
pil_img = Image.open(path)
pil_img = np.array(pil_img)
print((cv2_img == pil_img).all())  # False

demo.py yields exactly same results as evaluate.py if you replace these lines with:

img_prev = np.array(Image.open(frames[i]))
img_curr = np.array(Image.open(frames[i+1]))

from pygoturn.

junliang230 avatar junliang230 commented on August 21, 2024

very nice, thank you very much for detailed explanation

from pygoturn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.