You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: add huggingface_hub dependency to environment files
* Lock conda dependencies with huggingface hub package
* feat: implement DownloaderHuggingFace class for downloading files from HuggingFace Hub
* feat: use CustomJsonFormatter in LoggerJsonFile for enhanced logging
* Refactor model downloader configurations to use Hugging Face repository
- Updated multiple predictor configurations to switch from Google Drive downloader to Hugging Face downloader.
- Added repository IDs and filenames for models hosted on Hugging Face.
- Created new configuration files for models that were previously only available via Google Drive.
* fix: simplify local directory handling in DownloaderHuggingFace
* docs: update README to reflect model hosting transition from Google Drive to Hugging Face Hub
* Update documentation and enhance code structure
- Updated pdoc version from 0.11.1 to 0.11.6 in transforms.html and utils.html.
- Added collapsible sections for long docstrings in both transforms and utils documentation.
- Expanded source code sections for functions in transforms and utils, providing detailed docstrings.
- Improved the description of the DownloaderHuggingFace class and its methods in index.js.
* docs: update README to enhance visibility of Hugging Face Spaces demo
* style: standardize string quotes in CustomJsonFormatter
* style: improve code formatting and readability in DownloaderHuggingFace
* docs: update CHANGELOG for version 0.6.0 with new features and changes
* bump version to 0.6.0
* Update CHANGELOG.md
Co-authored-by: Copilot <[email protected]>
* Update CHANGELOG.md
Co-authored-by: Copilot <[email protected]>
* fix: update facetorch version requirement to 0.6.0 in notebook demo
* fix: remove unnecessary comment from efficientnet_b7 configuration files
* fix: update downloader to use HuggingFace for various predictors in merged.config.yaml
* fix: update downloader to use HuggingFace for various predictors in gpu.merged.config.yaml
* Update conf/analyzer/predictor/deepfake/efficientnet_b7_hf.yaml
Co-authored-by: Copilot <[email protected]>
* Update conf/analyzer/predictor/deepfake/efficientnet_b7_gdrive.yaml
Co-authored-by: Copilot <[email protected]>
* Update conf/analyzer/predictor/deepfake/efficientnet_b7_hf.yaml
Co-authored-by: Copilot <[email protected]>
* Update conf/analyzer/detector/retinaface_hf.yaml
Co-authored-by: Copilot <[email protected]>
* Update README.md
Co-authored-by: Copilot <[email protected]>
* Update conf/analyzer/predictor/deepfake/efficientnet_b7_gdrive.yaml
Co-authored-by: Copilot <[email protected]>
---------
Co-authored-by: Copilot <[email protected]>
<imgsrc="https://colab.research.google.com/assets/colab-badge.svg"alt="Open In Colab"/>
14
13
</a>
15
14
@@ -26,7 +25,7 @@
26
25
27
26
3.**Accelerated Performance:** Enjoy enhanced performance on both CPU and GPU with [TorchScript](https://pytorch.org/docs/stable/jit.html) optimization.
28
27
29
-
4.**Simple Extensibility:** Extend the library by uploading your model file to Google Drive and adding a corresponding configuration YAML file to the repository.
28
+
4.**Simple Extensibility:** Extend the library by uploading your model file to Hugging Face Hub (previously Google Drive) and adding a corresponding configuration YAML file to the repository.
30
29
31
30
Facetorch provides an efficient, scalable, and user-friendly solution for facial analysis tasks, catering to developers and researchers looking for flexibility and performance.
32
31
@@ -208,8 +207,8 @@ for Identity-invariant Facial Expression Recognition](https://arxiv.org/abs/2209
208
207
209
208
### Model download
210
209
211
-
Models are downloaded during runtime automatically to the *models* directory.
212
-
You can also download the models manually from a [public Google Drive folder](https://drive.google.com/drive/folders/19qlklR18wYfFsCChQ78it10XciuTzbDM?usp=sharing).
210
+
Models are downloaded during runtime automatically to the *models* directory using Hugging Face Hub (the default downloader has been switched from Google Drive to Hugging Face Hub).
211
+
Models are available on the [Hugging Face Hub](https://huggingface.co/tomas-gajarsky) and legacy models can also be accessed from the [original Google Drive folder](https://drive.google.com/drive/folders/19qlklR18wYfFsCChQ78it10XciuTzbDM?usp=sharing).
213
212
214
213
215
214
### Execution time
@@ -245,14 +244,13 @@ Run the Docker container:
245
244
246
245
### Add predictor
247
246
#### Prerequisites
248
-
1.file of the TorchScript model
249
-
2. ID of the Google Drive model file
247
+
1.File of the TorchScript model
248
+
2.Repository on Hugging Face Hub for hosting the model (or legacy ID of the Google Drive model file)
Facetorch works with models that were exported from PyTorch to TorchScript. You can apply [torch.jit.trace](https://pytorch.org/docs/stable/generated/torch.jit.trace.html) function to compile a PyTorch model as a TorchScript module. Please verify that the output of the traced model equals the output of the original model.
253
252
254
-
The first models are hosted on my [public Google Drive folder](https://drive.google.com/drive/folders/19qlklR18wYfFsCChQ78it10XciuTzbDM?usp=sharing). You can either send the new model for upload to me, host the model on your
255
-
Google Drive or host it somewhere else and add your own downloader object to the codebase.
253
+
Models are now hosted on [Hugging Face Hub](https://huggingface.co/tomas-gajarsky) which is the default download source. You can host your model on your own Hugging Face account or use the legacy Google Drive hosting option by specifying the appropriate downloader in your configuration.
256
254
257
255
#### Configuration
258
256
##### Create yaml file
@@ -264,10 +262,12 @@ Google Drive or host it somewhere else and add your own downloader object to the
1. Change the Google Drive file ID to the ID of the model.
268
-
2. Select the preprocessor (or implement a new one based on BasePredPreProcessor) and specify it's parameters e.g. image size and normalization in the yaml file
265
+
1. Set up the downloader configuration:
266
+
- For Hugging Face Hub (recommended): specify the `repo_id` and `filename` parameters
267
+
- For legacy Google Drive: specify the Google Drive file ID
268
+
2. Select the preprocessor (or implement a new one based on BasePredPreProcessor) and specify its parameters e.g. image size and normalization in the yaml file
269
269
to match the requirements of the new model.
270
-
3. Select the postprocessor (or implement a new one based on BasePredPostProcessor) and specify it's parameters e.g. labels in the yaml file to match
270
+
3. Select the postprocessor (or implement a new one based on BasePredPostProcessor) and specify its parameters e.g. labels in the yaml file to match
271
271
the requirements of the new model.
272
272
4. (Optional) Add BaseUtilizer derivative that uses output of your model to perform some additional actions.
0 commit comments