FIRST-Tech-Challenge / SkyStone

FTC SDK
https://www.firstinspires.org/robotics/ftc/what-is-first-tech-challenge
275 stars 1.04k forks source link

Consider allow more configurable options for Tensorflow Lite(TFLite) #210

Closed ssysm closed 4 years ago

ssysm commented 4 years ago

Currently I trained a model using a float model which can't work with current SDK(the SDK hard coded the tflite model to a quantized model). If we have use the model, the RobotCore library need to be dissembled and rebuild which is against the game rule. Is there any chance there will be more options to configure the TFod library?

The current configurable options thought the SDK are:

    private float minResultConfidence = 0.6f;
    private boolean trackerDisable = false;

available options from TFod are:

    private boolean isModelQuantized = true;
    private int inputSize = 300; // px

    private int numInterpreterThreads = 1;
    private int numExecutorThreads = 2;

    private int maxNumDetections = 10;
    private int timingBufferSize = 10;

    private double maxFrameRate = 30;

    private float minResultConfidence = 0.4f;

    private float trackerMaxOverlap = 0.2f;
    private float trackerMinSize = 16.0f;
    private float trackerMarginalCorrelation = 0.75f;
    private float trackerMinCorrelation = 0.3f;
    private boolean trackerDisable = false;

Please allow teams to configure those fields as by hard coding some of the limit their network/model choice. Thanks!

Windwoes commented 4 years ago

Somewhat off topic, but assuming you're trying to determine SkyStone position: just wanted to mention that you can create an OpenCV pipeline which examines hard-coded sample regions to determine skystone position with 100% accuracy in literally like 20 lines of code.

ssysm commented 4 years ago

Yes, thanks for mentioning that out. I just want to have more options on robot vision, not just limited to skystone detection (which ML is kinda unnecessary like you just mentioned if compared with opencv), we just want to practice our ML skills.

lizlooney commented 4 years ago

Thanks for reporting this!

cmacfarl commented 4 years ago

Resolved in v5.5