Comments (9)
- Run
python train.py CornerNet_Saccade --initialize
to generate a randomly initialized model, which will be saved tocache/nnet/CornerNet_Saccade/CornerNet_Saccade_0.pkl
. - Copy the parameters from the trained model to randomly initialized model except the
{tl,br}_heats
layers. The model is a Python dictionary where the keys are the parameter names and the values are the parameters. So you can easily filter out the parameters for the{tl,br}_heats
layers. - Save the model as
CornerNet_Saccade_pretrained.pkl
- Add
"pretrain": "/path/to/your/pretrained/model"
in thedb
section ofconfigs/CornerNet_Saccade.json
. - Start the training
python train.py CornerNet_Saccade
.
You may want to checkout the save and load functions in PyTorch.
from cornernet-lite.
@VCBE123 @heilaw
how to copy the param from one A pkl to another B pkl?The process is only forward? when get the B pkl ,then using train.py to train?
- Copy the parameters from the trained model to randomly initialized model except the {tl,br}_heats layers. The model is a Python dictionary where the keys are the parameter names and the values are the parameters. So you can easily filter out the parameters for the {tl,br}_heats layers.
from cornernet-lite.
@VCBE123 I'm a new comer in machine learning. May I ask where to modify in the coco.py to adapt the model to a dataset with different numbers of categories?
from cornernet-lite.
@VCBE123 I'm a new comer in machine learning. May I ask where to modify in the coco.py to adapt the model to a dataset with different numbers of categories?
you need to change "_coco_cls_ids", "_coco_cls_names",and the path to your dataset
from cornernet-lite.
@VCBE123 I have already changed ids and names. The question is that the dataset is generated by label me, which gives me hundreds of json files. When I point to a certain json file, there is an error:
Traceback (most recent call last):
File "train.py", line 249, in
main(None, ngpus_per_node, args)
File "train.py", line 220, in main
training_dbs = [datasets[dataset](config["db"], split=train_split, sys_config=system_config) for _ in range(workers)]
File "train.py", line 220, in
training_dbs = [datasets[dataset](config["db"], split=train_split, sys_config=system_config) for _ in range(workers)]
File "/home/deepvision/xc/CornerNet-Lite/core/dbs/coco.py", line 49, in init
self._detections, self._eval_ids = self._load_coco_annos()
File "/home/deepvision/xc/CornerNet-Lite/core/dbs/coco.py", line 59, in _load_coco_annos
class_ids = coco.getCatIds()
File "/home/deepvision/anaconda3/lib/python3.6/site-packages/pycocotools/coco.py", line 170, in getCatIds
cats = self.dataset['categories']
KeyError: 'categories'
So how to solve the problem? Thank you a lot.
from cornernet-lite.
You need to format your dataset to the coco-stytle.
from cornernet-lite.
how to use pascal_voc dataset training?
from cornernet-lite.
- Run
python train.py CornerNet_Saccade --initialize
to generate a randomly initialized model, which will be saved tocache/nnet/CornerNet_Saccade/CornerNet_Saccade_0.pkl
.- Copy the parameters from the trained model to randomly initialized model except the
{tl,br}_heats
layers. The model is a Python dictionary where the keys are the parameter names and the values are the parameters. So you can easily filter out the parameters for the{tl,br}_heats
layers.- Save the model as
CornerNet_Saccade_pretrained.pkl
- Add
"pretrain": "/path/to/your/pretrained/model"
in thedb
section ofconfigs/CornerNet_Saccade.json
.- Start the training
python train.py CornerNet_Saccade
.You may want to checkout the save and load functions in PyTorch.
I don't understand here:
2. Copy the parameters from the trained model to randomly initialized model except the {tl,br}_heats
layers. The model is a Python dictionary where the keys are the parameter names and the values are the parameters. So you can easily filter out the parameters for the {tl,br}_heats
layers.
from cornernet-lite.
@VCBE123 I'm a new comer in machine learning. May I ask where to modify in the coco.py to adapt the model to a dataset with different numbers of categories?
you need to change "_coco_cls_ids", "_coco_cls_names",and the path to your dataset
【 "categories": 80,】 in the db section of configs/CornerNet_Saccade.json。Do you need to change?
from cornernet-lite.
Related Issues (20)
- Using a data set with only one category, Loss dropped to 0.003, but when testing, ap = -1 HOT 1
- AttributeError: 'builtin_function_or_method' object has no attribute 'view' HOT 1
- ModuleNotFoundError: No module named 'core' HOT 3
- Has anyone use another backbone networks to test the performance?
- About "add downsampling lyaer before the hourglass module and remove one in hourglass modue" HOT 1
- train error
- When I testing my own data, occur No module named 'test.xxx'
- The network architecture of CornerNet-Saccade
- Can not create the envs on the first step, list many config package when created from file conda_packagelist.txt Please help me!! HOT 1
- Duplicated boxes during soft_nms HOT 1
- some training issue HOT 1
- some questions about the structure of cornerNet-saccade HOT 1
- when run the demo.py, the program is stuck
- 0%| | 0/90000 [00:00<?, ?it/s]段错误(吐核)
- ImportError undefined symbol: _ZNSt19basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev HOT 1
- When I train the model on my own dataset, I met IndexError in cornernet_saccade.py HOT 1
- error while tarining on my new dataset which has same COCO format HOT 1
- A small running error
- About the software requirements HOT 1
- [W Resize.cpp:19] Warning: An output with one or more elements was resized since it had shape [16263], which does not match the required output shape [14926].This behavior is deprecated, and in a future PyTorch release outputs will not be resized unless they have zero elements. You can explicitly reuse an out tensor t by resizing it, inplace, to zero elements with t.resize_(0). (function resize_output) 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 cornernet-lite.