* file path as input and have parse be in OnnxRunner.__init__
* modelproto_to_onnxrunner -> modelproto_to_runner
* whoops, fix import
* oh flakiness again, is it because it's getting gc-ed?
* small changes
* CI flaky so just move compile4 fix in
* copy typing of onnx_load
* actually can just import onnx_load instead of onnx.load
* fix external_benchmark_openpilot
* fix onnx_runner test to use onnx_helper
* rerun CI
* try run_modelproto
* spam CI a few times
* revert run_modelproto since that's flaky also
* no external onnx_load usage except onnx.py
* cursor tab complete is evil. Snuck a darn sorted in. But does order change result? Why?
* model_benchmark 193s -> 80s, add OnnxRunner.to()...
* minimize diff and clean up
* device can be None, weird but eh
---------
Co-authored-by: chenyu <chenyu@fastmail.com>
* clean up unused imports in examples
* enable unused import checking in examples
* lint
* ignore F541 and F841 - focus on unused imports only
* clean up
* restore tinygrad.frontend.torch for TINY_BACKEND
* tiny change
* start
* log severity
* only change this
* change abstraction so it's more usable for huggingface
---------
Co-authored-by: chenyu <chenyu@fastmail.com>
* this
* clean up
* more clean ups and improve debug msg
* more correct training toggler
* remove manual training toggling
* change some variable names
* actually just add the training toggle for LIMIT envvar too
* more refinement
* __call__ and OnnxRunner
* fix half pylint, other half is importing from onnx while this file is onnx.py, figure out later
* ahhhh found another mistake
* remove limit from __call__
---------
Co-authored-by: chenyu <chenyu@fastmail.com>
* added SPPF module from yolov8
* added conv_block, bottleneck modules
* cleaned modules
* c2f example
* spf changes
* C2f
* fixed and tested bottleneck
* improved detect class
* tested spf and conv
* checked c2f
* DFL structure
* fixed dfl
* added dist2bbox function
* added dist2bbox function
* added and tested make_anchors function for the head
* keeping functions above
* creating the detection head
* fixing head
* untested blocks a. scale_boxes b. clip_boxes c. xywh2xyxy d. box_iou
* head works
* structure fixx
* added darknet (backbone)
* yolov8 neck, and intialize bias function while detection
* fixed spacing
* yolov8 class, init bias, and fixed c2f
* forward pass almost working
* fixed net structure
* init bias not needed, forward pass working
* load weights boilerplate
* load weights done?
* all variants loading!
* post process: clip_boxes, scale_boxes, xywh2xyxy, and box_iou(untested)
* fix scale_boxes
* box_iou fixed and tested
* created the pre nms function
* fix nms
* fixed load weights, apparently the latest commit broke something, excluding num_batches_tracked
* added letterbox and pre_tranform for pre_process function
* fixed letterbox, pre_transform and added preprocess function
* custom NMS done, integrated prepare_boxes and nms, improved box_iou
* added postprocess function till parsing
* added draw_bounding_boxes_and_save function
* testing full flow
* using fetch for class names
* fixed make_anchors + all tinygrad now
* added command line arguments, weight downloading
* single image for now only
* made draw boxes more efficient
* made NMS functions efficient
* made compute_transform better
* v8 working now, inference is done
* prints objects detected in console now
* fixed image loading (pre processing)
* batch post processing
* created initial tests
* fixes bounding box thickness AND added get_detected_classes_with_frequency function
* cleaning for testing
* two tests
* added url option for image, removed need for specifiying arguments
* tests complete, but lots on things are printed on screen by ultralytics
* remove parse arguments
* fixed weight location
* fixed colours of classes, and black font when high brightness
* minor changes
* TODOs for later
* removed use of torch, using .npz weights
* fixed tests
* one path for fetch
* preprocess now in tinygrad, plus test fix for that
* updated tests
* fix tests
* no class labels needed
* Add files via upload
* Update showcase.md
* Update showcase.md
* added safe tensors as weights, and tests fix for that
* safe tensors test
* using safe_load
* using tinygrad functions now to load weights
* update tests
---------
Co-authored-by: r3sist-uniq <amanmatreja@gmail.com>
Co-authored-by: r3sist <72573738+r3sist-uniq@users.noreply.github.com>