Comments (4)
Hi, the evaluation script in the train folder is
python -m torch.distributed.launch --nproc_per_node=1 train.py --checkpoint ./pretrained_checkpoint/sam_vit_l_0b3195.pth --model-type vit_l --output work_dirs/hq_sam_l --eval --restore-model work_dirs/hq_sam_l/epoch_11.pth
In this script, we load sam_vit_l_0b3195.pth for the encoder output and load the additional parameters trained by ours with the argument --restore-model
. In training, we only learn a small number of parameters and save them. For evaluation on HQ dataset, we only need to load this group of parameters.
An example checkpoint for --restore-model
can be found here. You can also train it yourself.
from sam-hq.
from sam-hq.
Hi, when evaluating the four HQ datasets, we only need to load the mask_decoder of hq_sam. We do it this way because it saves storage space during training. For example,
--restore-model work_dirs/hq_sam_l/epoch_11.pth
Here epoch_11.pth
is the decoder part of the sam_hq_vit_l.pth
. An example checkpoint for --restore-model
can be found in this link. You can also train it yourself.
from sam-hq.
I faced this error too. I used the command python3 -m torch.distributed.launch --nproc_per_node=1 train.py --checkpoint ./pretrained_checkpoint/sam_vit_l_0b3195.pth --model-type vit_l --output work_dirs/hq_sam_l/ --eval --restore-model work_dirs/hq_sam_l/sam_hq_epoch_11.pth
where sam_hq_epoch_11.pth
was the final checkpoint that the training had saved. However when I tried with any other previous checkpoints, it worked as expected.
from sam-hq.
Related Issues (20)
- RuntimeError: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 804: forward compatibility was attempted on non supported HW
- Can we add support for transformers? HOT 3
- RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 1 but got size 13 for tensor number 1 in the list. HOT 1
- Training problem: During the training of sam-hq, the iou output of the val set is very high, 0.98; but in eval mode, the iou of the val set is only 0.48
- Segment Anything CPP Wrapper for macOS
- Can sam-hq perform breakpoint training: continue training on the already trained sam-hq, or continue training on the official sam-hq weights HOT 2
- Alternative implementation in Refiners
- About interm_embeddings
- Runtime error in Colab HOT 1
- How to train vit_tiny (Light HQ-SAM for real-time need): ViT-Tiny HQ-SAM model?
- Why can't we achieve the demonstration effect? There are three tennis rackets in the incoming image, and only one mask is returned
- Visualization of Figure 6
- can't we get candidates as original sam?
- About the issue of positive and negative sample pairs HOT 1
- Does SAM_HQ support batch input?
- Positive negative point inputs for SAM-hq
- no such pth file
- RuntimeError
- Evaluation for instance segmentation
- High-level question: is SAM-HQ suited for fine-tuning on specific tasks? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sam-hq.