xinntao / facexlib

FaceXlib aims at providing ready-to-use face-related functions based on current STOA open-source methods.
MIT License
810 stars 143 forks source link

recognition/__init__.py from 'cuda' to device parameter #46

Open jeffatllatos opened 7 months ago

jeffatllatos commented 7 months ago

Can you change this line only so we can use CPU or GPU.

FROM: model = Backbone(num_layers=50, drop_ratio=0.6, mode='ir_se').to('cuda').eval()

TO: model = Backbone(num_layers=50, drop_ratio=0.6, mode='ir_se').to(device).eval()