IBD | Interpretable Basis Decomposition for Visual Explanation | Artificial Intelligence library
kandi X-RAY | IBD Summary
kandi X-RAY | IBD Summary
This repository contains the demo code for the ECCV'18 paper "Interpretable Basis Decomposition for Visual Explanation".
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Generate concept index
- Fetch a single item from the queue
- Add samples to the reservoir
- Iterate over all batches in the database
- List of category names
- Loads the model
- Copy the state_dict into the state_dict
- Load checkpoint from file
- Test the accuracy of the clf
- Update the statistics
- Iterate over the batches from the server
- Prepare a segmentation worker
- Run the MAP algorithm
- Return a list of the category names
- Add data to the pool
- Generate a mask using vis_mat
- Integrate a function using a function
- Decode a label dict to a dictionary
- Upsample the input field
- Upsampling of a field
- Calculate the maximum coverage of primary categories
- Compute validation accuracy
- Generate HTML for an HTML report
- Train a feature
- Generate label for a given shape
- Upsample a field onto a field
- Resolve segmentation
- Make a mask set using a Gaussian filter
- Find the shortest path between two layers
IBD Key Features
IBD Examples and Code Snippets
Community Discussions
Trending Discussions on IBD
QUESTION
I'm having trouble deleting a table in MySQL v8.0 (on Windows 10) either from MySQL Workbench or via Python script (using mysql-connector-python). In both cases, the drop table command times out with "Error Code: 2013. Lost connection to MySQL server during query"
I previously set DBMS connection read timeout interval to 500 sec to try and work around this, but no luck.
The table in question has several hundred rows of data, and the entire .ibd file is 176kb. I suppose deleting the .ibd file directly isn't the greatest database practice?
I can create a new table and delete it, no problem. I'm running MySQL server locally.
Any suggestions on what to try next?
...ANSWER
Answered 2021-May-07 at 16:13@obe's suggestion to restart the server resolved the issue. So it seems like that particular table got locked due to access from both Workbench and python. Database itself was not locked, since I could create/drop other tables.
QUESTION
I went through this page of MySQL Doc . It is still not clear to me if the data stored in the filesystem (majorly as .ibd file) is encrypted by default or not for MySQL v8.0.x? I see bunch of info on the Tablespaces stating:
The mysql system tablespace contains the mysql system database and MySQL data dictionary tables. It is unencrypted by default.
Does it also mean that the stored data is not encrypted by default? Can someone help me point to the official doc where it says so?
...ANSWER
Answered 2021-Apr-11 at 11:56Yes, data is unencrypted by default.
Prior to MySQL 8.0.16, you have to explicitly set the encryption to enable it, see e.g. for File-Per-Table Tablespace Encryption:
Prior to MySQL 8.0.16, the ENCRYPTION clause must be specified to enable encryption.
which of course implies that if you don't specify it, it is disabled by default.
Since MySQL 8.0.16, the behaviour is inherited:
As of MySQL 8.0.16, the default_table_encryption system variable defines the default encryption setting for schemas and general tablespaces. CREATE TABLESPACE and CREATE SCHEMA operations apply the default_table_encryption setting when an ENCRYPTION clause is not specified explicitly.
By default, a table inherits the encryption setting of the schema or general tablespace it is created in. For example, a table created in an encryption-enabled schema is encrypted by default. This behavior enables a DBA to control table encryption usage by defining and enforcing schema and general tablespace encryption defaults.
but the default value for default_table_encryption
is off
:
Default Value OFF
Defines the default encryption setting applied to schemas and general tablespaces when they are created without specifying an ENCRYPTION clause.
The default_table_encryption variable is only applicable to user-created schemas and general tablespaces. It does not govern encryption of the mysql system tablespace.
Note that exisiting objects will not be encrypted automatically if you change the defaults, you have to alter them explicitly.
QUESTION
I'm using aws ec2 ubuntu and have ssh connection.
All commands entered from ssh connection to s3 produces the error:
...ANSWER
Answered 2021-Feb-12 at 07:17Same issue and same setup - server restart resolved it for me.
QUESTION
New to development & self-teaching (thanks Covid) so this could be sloppy :( sorry...
let me start off by saying I don't care about the data in the database - if it is easier to wipe it and start fresh, I'm good with that (don't know how to do that but I'm ok with it)
Not sure what caused the issue but one day MySQL wouldn't start. Using service MySQL Restart fixed it... two days later it happened again with this error
...ANSWER
Answered 2020-Jul-22 at 18:12mysql user is looking for a home directory, which seems to have not been assigned. To do that, you can execute:
QUESTION
We have a table called:
- activities
Each row has this values:
- id
- type (checkin/checkout)
- start (varchar 2020-11-30 15:45)
Given a specific day like 11-30-2020, assuming we have several checkin/checkouts how to sum hours and minutes from these day?
That's the function we tried to get the sum for all day:
...ANSWER
Answered 2020-Dec-01 at 11:27I think what you're after can be achieved very easily in MySQL itself (assuming you are using MySQL):
QUESTION
I have MySQL 5.7.24 running on a Windows VM. It has a few thousand databases (7000). I understand this is not the recommended set up for MySQL but some business requirements have necessitated this multi-tenant db structure and I cannot change that unfortunately.
The server works fine when it is running but the startup time can get pretty long, almost 20-30 mins after a clean shutdown of the MySQL service and 1+ hours after a restart of the Windows VM.
Is there any way to reduce the startup time?
In my configuration, I observed that innodb_file_per_table = ON (which is the default for MySQL 5.7 I believe) and so I think that at startup it is scanning every .ibd file.
Would changing innodb_file_per_table = OFF and then altering each table to get rid of the .ibd files be a viable option. One thing to note is that in general, every database size is pretty small and even with 7000 databases, the total size of the data is about 60gb only. So to my understanding, innodb_file_per_table = ON is more beneficial when there are single tables that can get pretty large which is not the case for my server.
Question: Is my logic reasonable and could this innodb_file_per_table be the reason for the slow startup? Or is there some other config variable that I can change so that each .ibd file is not scanned before the server starts accepting connections.
Any help to guide me in the right direction would be much appreciated. Thanks in advance!
...ANSWER
Answered 2020-Nov-12 at 14:46You should upgrade to MySQL 8.0.
I was working on a system with the same problem as yours. In our case, we had about 1500 schemas per MySQL instance, and a little over 100 tables per schema. So it was about 160,000+ tables per instance. It caused lots of problems trying to use innodb_file_per_table
, because the mysqld process couldn't work with that many open file descriptors efficiently. The only way to make the system work was to abandon file-per-table, and move all the tables into the central tablespace.
But that causes a different problem. Tablespaces never shrink, they only grow. The only way to shrink a tablespace is to move the tables to another tablespace, and drop the big one.
One day one of the developers added some code that used a table like a log, inserting a vast number of rows very rapidly. I got him to stop logging that data, but by then it was too late. MySQL's central tablespace had expanded to 95% of the size of the database storage, leaving too little space for binlogs and other files. And I could never shrink it without incurring downtime for our business.
I asked him, "Why were you writing to that table so much? What are you doing with the data you're storing?" He shrugged and said casually, "I dunno, I thought the data might be interesting sometime, but I had no specific use for them." I felt like strangling him.
The point of this story is that one naïve developer can cause a lot of inconvenience if you disable innodb_file_per_table
.
When MySQL 8.0 was being planned, the MySQL Product Manager solicited ideas for scalability criteria. I told him about the need to support instances with a lot of tables, like 160k or more. MySQL 8.0 included an all-new implementation of internal code for handling metadata about tables, and he asked the engineers to test the scalability with up to 1 million tables (with file-per-table enabled).
So the best solution to your problem is not to turn off innodb_file_per_table
. That will just lead to another kind of crisis. The best solution is to upgrade to 8.0.
Re your comment:
As far as I know, InnoDB does not open tables at startup time. It opens tables when they are first queried.
Make sure you have table_open_cache
and innodb_open_files
tuned for your scale. Here is some reading:
- https://dev.mysql.com/doc/refman/5.7/en/table-cache.html
- https://www.percona.com/blog/2009/11/18/how-innodb_open_files-affects-performance/
- https://www.percona.com/blog/2018/11/28/what-happens-if-you-set-innodb_open_files-higher-than-open_files_limit/
- https://www.percona.com/blog/2017/10/01/one-million-tables-mysql-8-0/
I hope you are using an SSD for storage, not a spinning disk. This makes a huge difference when doing a lot of small I/O operations. SSD storage devices have been a standard recommendation for database servers for about 10 years.
Also this probably doesn't help you but I gave up on using Windows around 2007. Not as a server nor a desktop.
QUESTION
Data I also have the total number of cancer patients (case_totals) and non-cancer patients(control_totals) which in this case is 100 and 1000 respectively.
...ANSWER
Answered 2020-Oct-20 at 14:06You can select column names by position or pattern in names or by specifying range of columns. It depends on how your data is structured.
QUESTION
I have a list of 4 verts loaded into a vert buffer, and an index loaded into a index buffer.
The issue I have is that while the LineList rendermode shows a quad just fine (see below) the TriangleList shows nothing (See below)
...ANSWER
Answered 2020-Oct-16 at 11:04Your two meshes, triangle and quad, have opposite triangle winding order. Here’s how.
By default, D3D11 uses CullMode=Back and FrontCounterClockwise=FALSE. This means it only renders front faces, and front face is defined as “when the vertices are counter-clockwise”.
As you see from the above illustration, your triangle indeed has counter-clockwise order, however both triangles of your quad are clockwise, GPU considers them as back faces and skips both.
You have many ways to fix, any of the following will do.
- Reorder vertices in vertex buffer.
- Flip triangles in index buffer to
{ 0, 3, 1, 1, 3, 2 }
- Change rasterizer state to disable back face culling,
CullMode=D3D11_CULL_NONE
- Change rasterizer state to switch front face winding direction,
FrontCounterClockwise=TRUE
- Change matrix passed to vertex shader to include mirroring component, e.g. scale with vector
[ -1, 1, 1 ]
represents a mirror transform that flips X, this will flip winding order of the whole mesh.
QUESTION
ANSWER
Answered 2020-Oct-14 at 19:22You can add more conditions to your existing code. Please note that I just generated a bunch of numbers to get some data.
QUESTION
My partition schemes looks something like:
...ANSWER
Answered 2020-Sep-18 at 16:55Windows or not?
Did you restart mysqld?
mv
on Linux (and close relatives) is really a "rename". And, assuming the target is on the same filesystem, that rename can even involve a different directory.
When a program (eg, mysqld
) has a file (eg, the table partition) "open" mysqld
, it has control over it -- even if you run off to a shell and rm
the file!.
I suspect that when you restart mysqld (for any reason, including reboot), the "data directory" will become messed up.
Aside from the filesystem's partitioning, you must tell MySQL when you "archive" a partition. Read up on "transportable tablespaces" for the version you are using. Here's a writeup for 5.6; 5.7 has some improvements.
I don't see the advantage of using a filesystem partition. With "transportable tablespaces", you can disconnect a MySQL partition from a PARTITIONed
table. This turns the partition into a table. Then that table can be deleted, renamed, copied, etc, without impacting the partitioned table. Search for "transportable" in http://mysql.rjweb.org/doc.php/partitionmaint ; there are some links.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install IBD
Clone the code of Network Dissection Lite from github
Download the Broden dataset (~1GB space) and the example pretrained model. If you already download this, you can create a symbolic link to your original dataset.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page