Downloads · 30 days
3
3% of all-time downloads
Daxiao123/LucaVirusCress
LucaVirusCress is a machine learning model from Daxiao123. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
[](https://huggingface.co/Daxiao123/LucaVirusCress) [](https://opensource.org/licenses/MIT) [](https://www.python.org/downloads/)
Downloads · 30 days
3
3% of all-time downloads
All-time downloads
110
Public
Repo size
94.8 MB
Likes
0
Public
Click a slice to open those files.
.bin94.8 MB · 100%
From the Hugging Face model README
LucaVirusCress is a specialized binary classification model for identifying CRESS (Circular Rep-Encoding Single-Stranded) DNA viruses by targeting REP (Replication-associated protein). Built on LucaProt, it supports high-throughput viral sequence screening in large metagenomic datasets.
The model reached optimal convergence at 4,000 global steps.
The training process used weighted loss to handle extreme class imbalance.
| Metric | Set | Visualization |
|---|---|---|
| Confusion Matrix | Test | ![]() |
| Confusion Matrix | Dev | ![]() |
| F1 Score | Evaluation | ![]() |
| Training Loss | Steps | ![]() |
To ensure high specificity, the model was trained on a highly imbalanced dataset (1:40 ratio) with carefully selected hard negatives.
| Resource | Specification |
|---|---|
| Hardware | NVIDIA L40S (46 GB VRAM) |
| Compute | 16 vCPUs |
| Software | CUDA 12.8 / Driver 570.172.08 |
| Training Time | Approximately 20 hours |
git clone https://github.com/lpyhhh/LucaVirusCress.git
cd LucaVirusCress
conda env create -f environment.yaml
conda activate lucaviruscress
# Download model files from Hugging Face
git clone https://huggingface.co/Daxiao123/LucaVirusCress hf_model
# Copy model files into checkpoint directory
mkdir -p models/cress/protein/binary_class/sefn/20230201140320/checkpoint-4000
cp -r hf_model/* models/cress/protein/binary_class/sefn/20230201140320/checkpoint-4000/
# Clean temporary directory
rm -rf hf_model
The embedding matrix is generated in real time.
cd src
python predict_one_sample.py \
--protein_id protein_1 \
--sequence "MTTSTAFT...(your sequence)" \
--emb_dir ../emb \
--dataset_name cress \
--dataset_type protein \
--task_type binary_class \
--model_type sefn \
--time_str 20260321140320 \
--step 4000 \
--threshold 0.5 \
--gpu_id 0
For large-scale screening of metagenomic assemblies:
cd src
python predict_many_samples.py \
--fasta_file ../data/input.fasta \
--save_file ../result/prediction_results.csv \
--emb_dir ../emb \
--dataset_name cress \
--model_type sefn \
--time_str 20260321140320 \
--step 4000 \
--gpu_id 0
Pre-trained weights and configuration are hosted on Hugging Face:
https://huggingface.co/Daxiao123/LucaVirusCress
This project is licensed under the MIT License. See LICENSE for details.
Thanks to everyone who supported this project.