0: Create your own SSL certificate and corresponding key file based on openssl toolkit, and put them in path 'vtubor/certificate/' 1: Run 'python webrtc_server.py --host your_ip --port your_port' 2: Running on https://your_ip:your_port in browser 3: You can change the camera device by modifing facingMode (user: front, environment: back) in vtubor/scripts/clients.js 翻译一下
时间: 2024-04-18 10:31:10 浏览: 95
0: 使用openssl工具包创建您自己的SSL证书和相应的密钥文件,并将它们放在路径 'vtubor/certificate/' 中。
1: 运行 'python webrtc_server.py --host 您的IP --port 您的端口'
2: 在浏览器中访问 https://您的IP:您的端口
3: 您可以通过修改vtubor/scripts/clients.js中的facingMode(user:前置摄像头,environment:后置摄像头)来更改摄像头设备。
相关问题
06/06/2023-16:31:47] [TRT] [I] [MemUsageChange] TensorRT-managed allocation in IExecutionContext creation: CPU +0, GPU +0, now: CPU 0, GPU 0 (MiB) /home/sniper/anaconda3/envs/labelme/lib/python3.8/site-packages/tensorrt/__init__.py:166: FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar. bool: np.bool, Traceback (most recent call last): File "/home/sniper/anaconda3/envs/labelme/bin/yolo", line 8, in <module> sys.exit(entrypoint()) File "/home/sniper/anaconda3/envs/labelme/lib/python3.8/site-packages/ultralytics/yolo/cfg/__init__.py", line 398, in entrypoint getattr(model, mode)(**overrides) # default args from model File "/home/sniper/anaconda3/envs/labelme/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "/home/sniper/anaconda3/envs/labelme/lib/python3.8/site-packages/ultralytics/yolo/engine/model.py", line 302, in val validator(model=self.model) File "/home/sniper/anaconda3/envs/labelme/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "/home/sniper/anaconda3/envs/labelme/lib/python3.8/site-packages/ultralytics/yolo/engine/validator.py", line 114, in __call__ model = AutoBackend(model, device=self.device, dnn=self.args.dnn, data=self.args.data, fp16=self.args.half) File "/home/sniper/anaconda3/envs/labelme/lib/python3.8/site-packages/ultralytics/nn/autobackend.py", line 174, in __init__ dtype = trt.nptype(model.get_binding_dtype(i)) File "/home/sniper/anaconda3/envs/labelme/lib/python3.8/site-packages/tensorrt/__init__.py", line 166, in nptype bool: np.bool, File "/home/sniper/anaconda3/envs/labelme/lib/python3.8/site-packages/numpy/__init__.py", line 305, in __getattr__ raise AttributeError(__former_attrs__[attr]) AttributeError: module 'numpy' has no attribute 'bool'. `np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations 如何修复
这个错误是由于使用了在NumPy 1.20中被废弃的`np.bool`别名所引起的。可以将`np.bool`替换为`bool`来避免这个错误。可以在代码中查找`np.bool`并将其替换为`bool`。如果你确实需要使用NumPy的布尔类型,可以使用`np.bool_`。你可以查看NumPy 1.20的发布说明以获取更多详细信息和指导。
A trictionary is a pair of tree k and v. They have identical structure: each node in k has a corresponding node in v. The labels in k are called keys. Each key may be the label for multiple nodes in k, and the values for that key are the labels of all the corresponding nodes in v. A lookup function returns one of the values for a key. Specifically, a lookup function for a node in k is a function that takes v as an argument and returns the label for the corresponding node in v. Implement the generator function lookups, which takes as input a tree k and a key. It yields all lookup functions for nodes in k that have key as their label, the functions could be yielded in any order.
Sure, here's the implementation of the generator function `lookups` in Python:
```python
def lookups(k, key):
"""
Given a tree k and a key, yield all lookup functions for nodes in k that have key as their label.
"""
if k.label == key:
yield lambda v: v.label
for child_k, child_v in zip(k.children, v.children):
yield from lookups(child_k, key)
yield from lookups(child_v, key)
```
This function checks if the label of the current node in `k` matches the given `key`. If it does, it yields a lambda function that takes in `v` and returns the label of the corresponding node in `v`. If not, it recursively calls `lookups` on all the children of `k` and `v`. The `yield from` keyword is used to yield all the lookup functions returned by the recursive calls.
Note that this assumes that the `Tree` class has a `label` attribute that stores the label of the node, and a `children` attribute that stores a list of child nodes.
阅读全文