Comments (2)
Hi Krzysiek,
I suppose that all you need is a detection mode (--config-file configs/COCO-Detection/faster_rcnn_R_50_FPN_3x.yaml
) to detect classes on the frames.
Then to extract class ids you can use:
predictions = data["predictions"]
instances = instances.to(self.cpu_device)
print(predictions.pred_classes)
Looking at the detectron2/utils/video_visualizer.py
is the best way to know how to extract needed information from the model predictions.
from detectron2-pipeline.
Labels Can be shown
-
By configuring the metadata of the model by the following line of code
MetadataCatalog.get(cfg.DATASETS.TRAIN[0]).thing_classes = ['class_1', 'class_2', class_3', 'and so on']
-
By adding the following argument Visualizer object
"MetadataCatalog.get(cfg.DATASETS.TRAIN[0])"
The final line of code will be
MetadataCatalog.get(cfg.DATASETS.TRAIN[0]).thing_classes = ['class_1', 'class_2', class_3', 'and so on']
v = Visualizer(im[:, :, ::-1], MetadataCatalog.get(cfg.DATASETS.TRAIN[0]), scale=1)
from detectron2-pipeline.
Related Issues (11)
- initial test, multiprocessor mode not working single process works HOT 1
- cpu+gpu is slower than gpu,How to solve?thanks!
- tracking took 15 seconds on >50 detections
- The video part is not working
- Display only certain pred_classes HOT 1
- can't compile detectron2 pillow issue HOT 1
- AssertionError: Number of gpus or cpus must be specified HOT 1
- Not an issue — Pipeline HOT 1
- Detectron2 external projects HOT 4
- [Question]Any possible way to make person reidentification project based on detectron2 HOT 1
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 detectron2-pipeline.