{"action":"closed","issue":{"url":"https://api.github.com/repos/fizyr/keras-retinanet/issues/290","repository_url":"https://api.github.com/repos/fizyr/keras-retinanet","labels_url":"https://api.github.com/repos/fizyr/keras-retinanet/issues/290/labels{/name}","comments_url":"https://api.github.com/repos/fizyr/keras-retinanet/issues/290/comments","events_url":"https://api.github.com/repos/fizyr/keras-retinanet/issues/290/events","html_url":"https://github.com/fizyr/keras-retinanet/issues/290","id":297056907,"number":290,"title":"Transfer Learning of Coco-trained model for new categories","user":{"login":"TroubleMak3r","id":2964427,"avatar_url":"https://avatars0.githubusercontent.com/u/2964427?v=4","gravatar_id":"","url":"https://api.github.com/users/TroubleMak3r","html_url":"https://github.com/TroubleMak3r","followers_url":"https://api.github.com/users/TroubleMak3r/followers","following_url":"https://api.github.com/users/TroubleMak3r/following{/other_user}","gists_url":"https://api.github.com/users/TroubleMak3r/gists{/gist_id}","starred_url":"https://api.github.com/users/TroubleMak3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TroubleMak3r/subscriptions","organizations_url":"https://api.github.com/users/TroubleMak3r/orgs","repos_url":"https://api.github.com/users/TroubleMak3r/repos","events_url":"https://api.github.com/users/TroubleMak3r/events{/privacy}","received_events_url":"https://api.github.com/users/TroubleMak3r/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-02-14T11:11:09Z","updated_at":"2018-02-14T14:14:00Z","closed_at":"2018-02-14T14:14:00Z","author_association":"NONE","body":"Hi,\r\n\r\nI'm trying to make a model localizing vehicle parts (eg. a bumper, windshield). Since my problem is very similar to localizing a car, (which is a very common object in Coco dataset and pre-trained model works remarkably well on it), I was thinking of loading a Coco pre-trained model, and re-train last layers on my own data (subset of Coco dataset), but with different labels. I've already manually labeled and localized a few houndred bumpers for starters, but I'm not sure what to do next... My idea is the following:\r\n\r\n1. Load the coco pre-trained model (resnet50_coco_best...).\r\n2. Set trainable parameter of the first N layers to False.\r\n3. Create a custom data generator (using CSVGenerator).\r\n4. Train the above model on a small subset of data with my custom generator.\r\n\r\n\r\nHowever, I have following questions: \r\n1. Which layers to freeze ? The model has 215 layers, I was thinking of treezing the first  203, up to and including keras.engine.training.Model.\r\n2. Will such model work on my custom dataset, with new labels and classes names (one to start with)? For starters, I get the \r\n`InvalidArgumentError (see above for traceback): Inputs to operation loss_1/classification_loss/Select_2 of type Select must have the same size and shape.  Input 0: [1,95193,1] != input 1: [1,95193,80]`\r\nIt's quite obvious since the original Coco dataset has 80 classes (and I have one - a bumper), but how to make it work on my model retaining the original weights and features up co certain layer?\r\n\r\nRegads,\r\nDominik"}}
{"actor":{"display_login":"hgaiser"}}