-
Notifications
You must be signed in to change notification settings - Fork 517
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/sg 747 support predict video full pipeline master (#829)
* wip * move to imageprocessors * wip * add back changes * making it work fully for yolox and almost for ppyoloe * minor change * working for det * cleaning * clean * undo * replace empty with none * add _get_shift_params * minor doc change * cleaning wip * working for multiple images * add ppyoloe * replace pydantic with dataclasses and fix typing * add docstrings * doc improvment and use get_shift_params in transforms * add tests * improve comment * rename * wip * add option to keep ratio in rescale * make functions private * remove DetectionPaddedRescale * fix doc * big commit with wrong things * try undo bad change * doc * minor doc * add a lot of doc * fix comment * minor change * first draft of load_video * adding save_video, some parts are still to be checked * wip * add __init__.py to pipelines * replace size with shape * wip * cleaning * wip * fix rgb to bgr and remove check * almost working, missing batch * proposal of predict_video * wip working on dete * add yolox * add flag to visualize * update * add streaming * improve streaming code * docstring update * fix stream example * rename Results * cleaning * rename stream to predict_webcam * doc fixes * improve docstring and homogenize some names * rename _images_prediction_lst * improve doc * add doc * minore change * fix image * fix ci * fix merge * reverse channel properly
- Loading branch information
1 parent
5ffdee5
commit a114860
Showing
22 changed files
with
906 additions
and
227 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/super_gradients/examples/predict/detection_predict_image_folder.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from super_gradients.common.object_names import Models | ||
from super_gradients.training import models | ||
|
||
# Note that currently only YoloX and PPYoloE are supported. | ||
model = models.get(Models.YOLOX_N, pretrained_weights="coco") | ||
|
||
image_folder_path = "../../../../documentation/source/images/examples" | ||
predictions = model.predict(image_folder_path) | ||
predictions.show() |
6 changes: 6 additions & 0 deletions
6
src/super_gradients/examples/predict/detection_predict_streaming.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from super_gradients.common.object_names import Models | ||
from super_gradients.training import models | ||
|
||
# Note that currently only YoloX and PPYoloE are supported. | ||
model = models.get(Models.YOLOX_N, pretrained_weights="coco") | ||
model.predict_webcam() |
9 changes: 9 additions & 0 deletions
9
src/super_gradients/examples/predict/detection_predict_video.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from super_gradients.common.object_names import Models | ||
from super_gradients.training import models | ||
|
||
# Note that currently only YoloX and PPYoloE are supported. | ||
model = models.get(Models.YOLOX_N, pretrained_weights="coco") | ||
|
||
video_path = "<path/to/your/video>" | ||
predictions = model.predict(video_path) | ||
predictions.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.