deepinsight / deepinsight/insightface
miss import in Insightface python package
- Dominant language
- Python
- Stars
- 29.7k
- Forks
- 6.1k
- PR merge metrics
- No merged PRs in 30d
Description
At `model_zoo.face_detection` code imports mxnet and mxnet.ndarray inside FaceDetector __init__ function which makes the code unusable for example,
```
from insightface.model_zoo.face_detection import retinaface_r50_v1
model = retinaface_r50_v1()
model.prepare(ctx_id = -1, nms=0.4)
```
which will result in
```
NameError: name 'mx' is not defined
```
importing them at top of the module will fix the issue or doing any correct way of local importing
since `model_zoo.get_model` has changed and can't be used to use the models anymore, this was the easiest way I could find to load models
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the model_zoo.face_detection module and inspect FaceDetector.__init__, where the issue reports local imports of mxnet and mxnet.ndarray. Run the retinaface_r50_v1 example from the issue to reproduce the NameError, then verify that the example can construct and prepare the model without that error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100