Where can I find the folder SegmentationClassRaw when using semantic segmentation? - tensorflow

I want to learn semantic segmentation to train my own dataset in this link.
But when I downloaded the voc2012 dataset, I didn't find this folder SegmentationClassRaw in voc2012 dataset.
My folder structure is like this:
── VOC2012
├── Annotations
├── ImageSets
│ ├── Action
│ ├── Layout
│ ├── Main
│ └── Segmentation
├── JPEGImages
├── SegmentationClass
└── SegmentationObject
So where can I find the folder SegmentationClassRaw?

Now I know how to fix it.
Go to this folder models-master/research/deeplabdatasets.
Use this command:
python remove_gt_colormap.py --original_gt_folder=./pascal_voc_seg/VOCdevkit/VOC2012/SegmentationClass --output_dir=./pascal_voc_seg/VOCdevkit/VOC2012/SegmentationClassRaw
Then the folder SegmentationClassRaw will be generated automatically.

Related

CMake: linking shared library located out of root project

How to handle library out of project's root?
Currently I want to use CMake to link to my project shared library that is located not in the root directory of a certain library. The library is located in lib, it's shared only between projects located in projects\project_n. Also, I need every project to build the lib independently
.
├── lib
│ ├── CMakeLists.txt
│ ├── src1.c
│ ├── hed1.h
│ ├── src2.c
│ ├── hed2.h
│ ...
│ ├── src_n.c
│ └── hed_n.h
└── projects
├── project_1
│ ├── Src
│ ├── Inc
│ ├── build
│ └── CMakeLists.txt
├── project_2
│ ├── Src
│ ├── Inc
│ ├── build
│ └── CMakeLists.txt
...
└── project_n
├── Src
├── Inc
├── build
└── CMakeLists.txt
Currently my lib\CMakeLists.txt looks like that:
cmake_minimum_required(VERSION 3.20)
file(GLOB_RECURSE SRCS *.c)
add_library(lib SRCS)
Part of code in projects\project_1\CMakeLists.txt responsible for lib linking looks like that:
add_subdirectory(../../lib build)
target_include_directories(${PROJECT_NAME} PUBLIC ../../lib)
target_link_directories(${PROJECT_NAME} PRIVATE ../../lib)
target_link_libraries(${PROJECT_NAME} lib)
Currently I'm getting Errors belows:
CMake Error at CMakeLists.txt:65 (target_include_directories):
Cannot specify include directories for target "project_1" which is
not built by this project.
CMake Error at CMakeLists.txt:66 (target_link_directories):
Cannot specify link directories for target "project_1" which is not
built by this project.
CMake Error at CMakeLists.txt:67 (target_link_libraries):
Cannot specify link libraries for target "project_1" which is not
built by this project.

How to access local images in Electron app with Vue

I have an Electron app that uses Vue for its UI. The app downloads compressed data files from a server. The files contain compressed HTML. The app decompresses and display the HTML. That's all working fine.
The HTML may contain img tags that reference images that are also compressed in the downloaded file. I extract and decompress these images, but then need to a) put them somewhere that the app can see them, and b) construct an img tag that correctly references these images.
Rather than list the dozens of places I've tried to put these images, suffice to say that no matter where I put the images, I don't seem to be able to access them from the app. I get a 404 error, and usually a message saying the app can't reference local resources.
Any suggestions for where the app should store these images, and then how to reference them from img tags?
I have a related problem with images I could reference from the Web, but would prefer to download and cache locally so that the app can display them when there's no internet connection. I feel like if I can solve one of these problems, I can solve them both.
this below setting(s) works for me...
.
├── dist
│ ├── css
│ │ └── app.6cb8b97a.css
│ ├── img
│ │ └── icon.1ba2ae71.png
│ ├── index.html
│ └── js
│ ├── app.08f128b0.js
│ ├── app.08f128b0.js.map
│ ├── chunk-vendors.e396765f.js
│ └── chunk-vendors.e396765f.js.map
├── electron.js
├── package.json
├── package-lock.json
├── public
│ ├── favicon.ico
│ └── index.html
└── src
├── App.vue
├── components
│ ├── _breakpoint.scss
│ └── RoundList.vue
├── img
│ ├── bullet.svg
│ └── icon.png
└── index.js
vue.config.js:
const path = require("path");
module.exports = {
outputDir: path.resolve(__dirname, "./basic_app/dist"),
publicPath: './'
};
part of package.json
"scripts": {
"build:vue": "vue-cli-service build",
"serve:electron": "electron .",
"serve": "concurrently \"yarn build:vue\" \"yarn serve:electron\"",
"build:electron": ""
},
the output: https://i.stack.imgur.com/nKK7y.png

Force include node_modules in package?

I want to npm publish my dist dir that looks like this:
dist
├── README.md
├── node_modules
│   └── clap
│   └── dist
│   └── es
│   ├── index.js
│   └── index.js.map
├── package.json
...
└── utils
├── memory-stream.js
├── memory-stream.js.map
├── mysql-users.js
├── mysql-users.js.map
├── sql.js
├── sql.js.map
├── utils.js
└── utils.js.map
Notice how there's a node_modules dir in there. I want to publish that along with everything else.
The files in there are compiled, but they're part of a local package not distributed on npm, so I do want it bundled.
My code references it like this:
var index = require('../node_modules/clap/dist/es/index.js');
So it should work perfectly fine.
The problem is that it looks like npm publish has it hardcoded to ignore directories called node_modules. Is there any way to override that behaviour?

Bower list shows the red "different" tag

When I run the Bower list command, I have the tree with some packages with the "different" tag in red color.
├── iron-dropdown#2.0.0
├── iron-fit-behavior#2.0.1
├── iron-flex-layout#2.0.0 different
├─┬ iron-form#2.0.0
│ ├── iron-ajax#2.0.5
│ └── polymer#2.0.2
├── iron-form-element-behavior#2.0.0 different
Anyone knows what does it mean?? Thanks!
Edit:
According to the Bower package source code:
// Check if source changed, marking as different if it did
// We only do this for direct root dependencies that are compatible

rails3 asset pipeline and file collisions

I'm updating an existing rails 2 app to rails 3, and having some trouble understanding the asset pipeline. I have read through the guide and as I understand it, files in any of the following directories will resolve to /assets:
app/assets
lib/assets
vendor/assets
and you could access them using helpers...i.e.
image_tag('logo.png')
But what I don't understand is how collisions are handled? For example, what if there are the following files:
app/assets/images/logo.png
lib/assets/images/logo.png
If I go to myapp.com/assets/images/logo.png, which file will be returned? I could check for collisions manually within my app, but this becomes a pain point when using gems that rely on the asset pipeline.
Based on what I've found, you can't have duplicate files, as rails will just return the first one found.
This seems like a bit of a design flaw, as a gem may not namespace their own assets
Why not taking advantage of the index manifest and organize your app/assets into decoupled modules? You can then reference to a particular image, image_tag('admin/logo.png'), and get for free your UI codebase organised in a more meaningful way. You could even promote a complex component, such as Single Page Application into it's own module and reuse it from different parts of the app.
Let's say you app is composed out of three modules: the public side, an admin UI and, e.g., a CRM to let your agents track the selling process at your company:
app/assets/
├── coffeescripts
│   ├── admin
│   │   ├── components
│   │   ├── index.coffee
│   │   └── initializers
│   ├── application
│   │   ├── components
│   │   ├── index.sass
│   │   └── initializers
│   └── crm
│   ├── components
│   ├── index.sass
│   └── initializers
├── images
│   ├── admin
│   ├── application
│   └── crm
└── stylesheets
├── admin
│   ├── components
│   └── index.sass
├── application
│   ├── components
│   └── index.sass
└── crm
├── components
└── index.sass
21 directories, 6 files
Don't forget to update your application.rb so they will be precompiled properly:
config.assets.precompile = %w(admin.js application.js crm.js
admin.css application.css crm.css)