elucideye / acf

Aggregated Channel Feature object detection in C++ and OpenGL ES 2.0 based on https://github.com/pdollar/toolbox
BSD 3-Clause "New" or "Revised" License
49 stars 20 forks source link

acf model parsing edge cases #96

Closed headupinclouds closed 6 years ago

headupinclouds commented 6 years ago

@xsacha posted:

Even if you name it pcb but the file doesn't exist it will error out ... if you name it .dat and the file doesn't exist (or even if it does), it doesn't error

headupinclouds commented 6 years ago

If you have a file with an unsupported extension then these methods will return false:

    bool good() const { return m_good; }
    explicit operator bool() const { return m_good; }

Asigned here:

Detector::Detector(std::istream& is, const std::string& hint)
{
    m_good = deserializeAny(is, hint) == 0;
}

Detector::Detector(const std::string& filename)
{
    m_good = deserializeAny(filename) == 0;
}