Skip to content

Commit

Permalink
add coneslayer-redux
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrupczak3 committed May 11, 2023
1 parent 9c40bb8 commit ce7400b
Show file tree
Hide file tree
Showing 9 changed files with 15,634 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
coneslayer-deluxe.pt filter=lfs diff=lfs merge=lfs -text
coneslayer-deluxe/coneslayer-deluxe.pt filter=lfs diff=lfs merge=lfs -text
coneslayer-redux/coneslayer-redux.bin filter=lfs diff=lfs merge=lfs -text
coneslayer-redux/coneslayer-redux.pt filter=lfs diff=lfs merge=lfs -text
coneslayer-redux/coneslayer-redux_openvino_2022.1_6shave.blob filter=lfs diff=lfs merge=lfs -text
coneslayer-redux/coneslayer-redux-simplified.onnx filter=lfs diff=lfs merge=lfs -text
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ python -m pip install requirements.txt

Finally, run the command:
```bash
python3 detect.py --weights coneslayer.pt --conf 0.54 --iou 0.10 --img-size 416 --source ~/Path/To/Images
python3 detect.py --weights coneslayer.pt --conf 0.54 --iou 0.50 --img-size 416 --source ~/Path/To/Images
```

Alternatively, this repo uses the Luxonis Depthai Python SDK to obtain depth values for cones detected using the OAK-D:
Expand All @@ -62,15 +62,28 @@ Alternatively, this repo uses the Luxonis Depthai Python SDK to obtain depth val

You may also use one of the converted versions of the model, such as `coneslayer_openvino_2021.4_6shave.blob`, `coneslayer-simplified.onnx`, or `coneslayer.bin` created using [tools.luxonis.com](https://tools.luxonis.com). Usage as such may require an associated metadata file in either XML or JSON format.

## Coneslayer Redux

A moderately larger Coneslayer model, "Coneslayer Redux" is now available in the `coneslayer-redux` folder. It has an increased input size of 640x640 and is based on the YOLOv7 base model with ~32 million parameters, versus the original Coneslayer's 6 million. It was trained using the same methodology as Coneslayer, but the larger model size may allow it to be more accurate despite a reduced speed of inference.

To run coneslayer-redux, clone this repo and copy `coneslayer-redux.pt` to your `yolov7` directory. Perform the same steps as listed previously to establish your virtualenv (if you haven't done so already)

Finally, run the command:
```bash
python 3 detect.py --weights coneslayer-redux.pt --conf 0.54 --iou 0.50 --img-size 640 --source ~/Path/To/Images
```

You may also use one of the converted versions of the model, such as `coneslayer-redux_openvino_2022.1_6shave.blob`, `coneslayer-redux-simplified.onnx`, or `coneslayer-redux.bin` created using [tools.luxonis.com](https://tools.luxonis.com). Usage as such may require an associated metadata file in either XML or JSON format.

## Coneslayer Deluxe

A larger Coneslayer, with an increased input size of 1280x1280 and based on YOLOv7-E6E with ~152 million parameters versus YOLOv7-tiny's 6 million, was trained using 4x V100 32Gb for about 120 computer hours. It is available from this repository only as the pytorch binary and not the onyx or other formats.
An even larger Coneslayer, with an increased input size of 1280x1280 and based on YOLOv7-E6E with ~152 million parameters versus YOLOv7-tiny's 6 million, was trained using 4x V100 32Gb for about 120 computer hours. It is available from this repository only as the pytorch binary and not the onyx or other formats.

To run coneslayer-deluxe, clone this repo and copy `coneslayer-deluxe.pt` to your `yolov7` directory. Perform the same steps as listed previously to establish your virtualenv (if you haven't done so already)

Finally, run the command:
```bash
python3 detect.py --weights coneslayer-deluxe.pt --conf 0.54 --iou 0.10 --img-size 1280 --source ~/Path/To/Images
python3 detect.py --weights coneslayer-deluxe.pt --conf 0.54 --iou 0.50 --img-size 1280 --source ~/Path/To/Images
```

## Demo
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions coneslayer-redux/coneslayer-redux-simplified.onnx
Git LFS file not shown
3 changes: 3 additions & 0 deletions coneslayer-redux/coneslayer-redux.bin
Git LFS file not shown
60 changes: 60 additions & 0 deletions coneslayer-redux/coneslayer-redux.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"model": {
"xml": "coneslayer-redux.xml",
"bin": "coneslayer-redux.bin"
},
"nn_config": {
"output_format": "detection",
"NN_family": "YOLO",
"input_size": "640x640",
"NN_specific_metadata": {
"classes": 1,
"coordinates": 4,
"anchors": [
4.45703125,
9.078125,
7.21484375,
13.9921875,
11.9296875,
22.453125,
19.75,
35.15625,
44.0,
74.1875,
82.875,
168.75,
168.5,
239.125,
218.875,
375.0,
322.0,
589.5
],
"anchor_masks": {
"side80": [
0,
1,
2
],
"side40": [
3,
4,
5
],
"side20": [
6,
7,
8
]
},
"iou_threshold": 0.5,
"confidence_threshold": 0.54
}
},
"mappings": {
"labels": [
"cone"
]
},
"version": 1
}
3 changes: 3 additions & 0 deletions coneslayer-redux/coneslayer-redux.pt
Git LFS file not shown
Loading

0 comments on commit ce7400b

Please sign in to comment.