Hints: You can use the debugger and set breakpoints to see the object and its attibutes returned by predict() . A confidence threshold value of 0.7 works. Other values are also acceptable as long as it’s not too low or high. Ultralytics documentation is slightly out of date, so some of the requested settings are not included. Try searching outside of the documentation! Think about what you’re returning. Is it safe to assume that the code that will end up using your returned values has a check for None ? After all, the method signature promises to return a list of BoundingBox , not a list of BoundingBox | None . Look at the definition of BoundingBox.create() , what do we want to return if the creation of a BoundingBox fails?
|