deepinsight / deepinsight/insightface
why det size can't be reprepared?
- Dominant language
- Python
- Stars
- 29.7k
- Forks
- 6.1k
- PR merge metrics
- No merged PRs in 30d
Description
Tracing [comfyui-reactor issue](https://github.com/Gourieff/comfyui-reactor-node/issues/22) into [retinaface.py](https://github.com/deepinsight/insightface/blob/01a34cd94f7b0f4a3f6c84ce4b988668ad7be329/python-package/insightface/model_zoo/retinaface.py#L141)
```
def prepare(self, ctx_id, **kwargs):
if ctx_id<0:
self.session.set_providers(['CPUExecutionProvider'])
nms_thresh = kwargs.get('nms_thresh', None)
if nms_thresh is not None:
self.nms_thresh = nms_thresh
det_thresh = kwargs.get('det_thresh', None)
if det_thresh is not None:
self.det_thresh = det_thresh
input_size = kwargs.get('input_size', None)
if input_size is not None:
if self.input_size is not None:
print('warning: det_size is already set in detection model, ignore') #<----
else:
self.input_size = input_size
```
To reset the input size, comfyui-reactor performed a deepcopy at the expense of performance. I wonder if I can override self.input_size directly with input size from the parameter here?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.