yolov5s.torchscript.ptl
See original GitHub issueVersion
1.1.0
Problem Area
react-native-pytorch-core (core package)
Steps to Reproduce
run model yolov5s.torchscript.ptl
Expected Results
get results (bbox, class)
Code example, screenshot, or link to repository
Error Possible Unhandled Promise Rejection (id: 0): Error: End of input at character 0 of promiseMethodWrapper
Did I follow this instruction to convert .pt to .ptl or am I doing something wrong? https://github.com/pytorch/android-demo-app/tree/master/ObjectDetection I ran android project pytorch mobile model worked there.
As I understand it, you need live.spec.json but where to get it for yolov5?
It’s him ? I used it but it still gives an error or I need to project it?
{'config.txt': '{"shape": [1, 3, 640, 640], "stride": 32, "names": ["person", "bicycle", "car", "motorcycle", "airplane", "bus", "train", "truck", "boat", "traffic light", "fire hydrant", "stop sign", "parking meter", "bench", "bird", "cat", "dog", "horse", "sheep", "cow", "elephant", "bear", "zebra", "giraffe", "backpack", "umbrella", "handbag", "tie", "suitcase", "frisbee", "skis", "snowboard", "sports ball", "kite", "baseball bat", "baseball glove", "skateboard", "surfboard", "tennis racket", "bottle", "wine glass", "cup", "fork", "knife", "spoon", "bowl", "banana", "apple", "sandwich", "orange", "broccoli", "carrot", "hot dog", "pizza", "donut", "cake", "chair", "couch", "potted plant", "bed", "dining table", "toilet", "tv", "laptop", "mouse", "remote", "keyboard", "cell phone", "microwave", "oven", "toaster", "sink", "refrigerator", "book", "clock", "vase", "scissors", "teddy bear", "hair drier", "toothbrush"]}'}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:8
- Comments:19 (5 by maintainers)
@JohnZcp, @Aisenapio, @dongdv95, @bairock, @jslok, and @zhiqwang, the latest release
0.2.0
of PyTorch Live has a JavaScript API to pre-/post-process data. Thelive.spec.json
is no longer needed.I create a YOLOv5 example app with the new PyTorch Live API.
It would be fantastic if this could also work with the YOLOv5 Runtime Stack!
Just FYI,
The official torchscript exported by yolov5 only contains the general model inferencing part, one must implement the pre-preprocess (
letterbox
) and post-proprocess (mainly thenms
op) if they want to deploy this torchscript.We did some experiments on yolort to embed the pre-processing and post-processing into the torchscript graph following the strategy of TorchVision’s object detection banks, as such we don’t need to write the pre-process and post-process within torchlive. So it will be very easy to deploy YOLOv5 with yolort if we could deploy the models in TorchVision on torchlive.