tinygrad/examples
sehaj 775287ed91
Add yolov8 implementation (#806)
* 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>
2023-06-16 18:55:19 -07:00
..
mlperf feat: add train scaffolding (#859) 2023-05-30 07:10:40 -07:00
yolo Permute examples (#731) 2023-03-29 05:07:06 +04:00
__init__.py failing llama test 2023-03-11 16:28:10 -08:00
benchmark_train_efficientnet.py rename log_softmax, support dim, fix onnx Softmax 2023-02-24 10:11:24 -08:00
compile_efficientnet.py Devicebufferless (#708) 2023-03-18 14:40:23 -07:00
compile_tensorflow.py moved extras/jit.py -> tinygrad/jit.py (#599) 2023-02-25 08:32:33 -08:00
deep_deterministic_policy_gradient.py Fixed DDPG example (#667) 2023-03-09 11:49:52 -08:00
efficientnet.py Cast image to float32 (#702) 2023-03-14 08:13:19 -07:00
hlb_cifar10.py nn init matches torch (#901) 2023-06-01 21:24:11 -07:00
hlb_cifar10_torch.py nn init matches torch (#901) 2023-06-01 21:24:11 -07:00
llama.py Adds tril & triu support (#936) 2023-06-09 22:13:20 -07:00
mnist_gan.py Cast Tensor data to float32 (#703) 2023-03-14 23:09:41 -07:00
serious_mnist.py rename log_softmax, support dim, fix onnx Softmax 2023-02-24 10:11:24 -08:00
stable_diffusion.py Adds tril & triu support (#936) 2023-06-09 22:13:20 -07:00
train_efficientnet.py train_efficientnet: only import datasets.imagenet when IMAGENET is set (#899) 2023-06-01 19:19:52 -07:00
train_resnet.py ResNet: match implementation with Nvidia and PyTorch (#770) 2023-05-10 09:01:22 -07:00
transformer.py add int64 as supported dtype from numpy (#699) 2023-03-18 17:15:04 -07:00
vgg7.py Remove Tensor.data (#565) 2023-02-18 16:36:12 -08:00
vit.py Remove Tensor.data (#565) 2023-02-18 16:36:12 -08:00
whisper.py there is a better way to do that! (#950) 2023-06-06 15:23:30 -07:00
yolov3.py Permute examples (#731) 2023-03-29 05:07:06 +04:00
yolov8-onnx.py Add yolov8 implementation (#806) 2023-06-16 18:55:19 -07:00
yolov8.py Add yolov8 implementation (#806) 2023-06-16 18:55:19 -07:00